-
Notifications
You must be signed in to change notification settings - Fork 72
QVTKWidget vs QVTKWidget2 vs QVTKGraphicsItem.
For all of these it is impossible to draw Widget at the top of it using OSX (cocoa).
Should Works on all platform, inherits from QWidget.
QPixmap QPixmap::grabWidget()
seems not to work with OSX if the widget is not visible.
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.
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, https://github.com/rdebroiz/medInria-public/tree/ContainerAndViewRefactoring-graphicsItem-windows but not with windows, where performances are not acceptable.
QPixmap QPixmap::grabWidget()
is still not possible but we can use the QImage QGLFrmaeBufferObject::toImage()
to get around (QVTKGraphicsItem, has a QGLFrmaeBufferObject as protected member).