Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Graphical issue on MacOS when using QVTKWidget in QMainWindow and going fullscreen
Forum Update on Monday, May 27th 2025

Graphical issue on MacOS when using QVTKWidget in QMainWindow and going fullscreen

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 399 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jonob23
    wrote on last edited by
    #1

    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).

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved