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();
    }
    

    0_1501590193650_Screen Shot 2017-07-31 at 20.49.45.png

    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();
    }
    

    0_1501590208510_Screen Shot 2017-07-31 at 20.50.38.png

    macOS Sierra, Qt 5.9.1, VTK 8.0.0 (I also observed this behavior with previous versions of VTK).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.