Unsolved Graphical issue on MacOS when using QVTKWidget in QMainWindow and going fullscreen
-
I get a graphical glitch with the top toolbar in a QMainWidow when going fullscreen with macOS. The issue appears when using QVTKWidget in the central widget.
Minimal program that reprodcues the issue:
/#include <QApplication> #include <QMainWindow> #include <QWidget> #include <QToolBar> #include <QVTKWidget.h> int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow * window = new QMainWindow(); QVTKWidget * widget = new QVTKWidget(window); window->setCentralWidget(widget); QToolBar * toolBar = new QToolBar(window); window->addToolBar(Qt::TopToolBarArea, toolBar); window->show(); return app.exec(); }
If QWidget is used instead of a QVTKWidget the glitch does not occur:
#include <QApplication> #include <QMainWindow> #include <QWidget> #include <QToolBar> #include <QVTKWidget.h> int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow * window = new QMainWindow(); QWidget * widget = new QWidget(window); window->setCentralWidget(widget); QToolBar * toolBar = new QToolBar(window); window->addToolBar(Qt::TopToolBarArea, toolBar); window->show(); return app.exec(); }
macOS Sierra, Qt 5.9.1, VTK 8.0.0 (I also observed this behavior with previous versions of VTK).