-
Notifications
You must be signed in to change notification settings - Fork 71
QVTKWidget vs QVTKWidget2 vs QVTKGraphicsItem.
For all of these it is impossible to draw Widget at the top of it using OSX (cocoa).
###QVTKWidget
Should Works on all plateforme, inherths from QWidget.
QPixmap QPixmap::grabWidget()
seemes to doesn't work with OSX if the widget is not visible.
###QVTKWidget2
QPixmap QPixmap::grabWidget()
is not possible because it inherits from QGLWidget, you can use QImage QGLWidget::grabFrameBuffer()
instead. This complicated the QImage medWorkspaceArea::grabScreenshot()
method. ALso it doesn't work with OSX the resulting QImage is randomly filled.
###QVTKGraphicsItem
Allow to draw on the top of the view thanks to the QtGraphics framework. the widget returned by the view has to be a QGraphicsView. works well with some work (sync of the size of the item and the view, binds between Qt and VTK doubleClick event missing) under Linux and OSX, see https://github.com/rdebroiz/medInria-public/tree/ContainerAndViewRefactoring-graphicsItem but not with windows, see : http://qt-project.org/forums/viewthread/41334/
QPixmap QPixmap::grabWidget()
is still not possible but we can use the QImage QGLFrmaeBufferObject::toImage()
to get around (QVTKGraphicsItem, have a QGLFrmaeBufferObject as protected member).