2

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

Pic1

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

Pic2

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

KernelPanic
  • 2,328
  • 7
  • 47
  • 90
jonob23
  • 21
  • 1

0 Answers0