2 Attachment(s)
Qt and VTK graphical issue on MacOS when using QVTKWidget and QMainWindow
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 reproduces the issue:
Code:
#include <QApplication>
#include <QMainWindow>
#include <QWidget>
#include <QToolBar>
#include <QVTKWidget.h>
int main(int argc, char *argv[])
{
QVTKWidget * widget = new QVTKWidget(window);
window->setCentralWidget(widget);
window->addToolBar(Qt::TopToolBarArea, toolBar);
window->show();
return app.exec();
}
Attachment 12536
If QWidget is used instead of a QVTKWidget the glitch does not occur:
Code:
#include <QApplication>
#include <QMainWindow>
#include <QWidget>
#include <QToolBar>
#include <QVTKWidget.h>
int main(int argc, char *argv[])
{
window->setCentralWidget(widget);
window->addToolBar(Qt::TopToolBarArea, toolBar);
window->show();
return app.exec();
}
Attachment 12535
macOS Sierra, Qt 5.9.1, VTK 8.0.0 (I also observed this behavior with previous versions of VTK).
Re: Qt and VTK graphical issue on MacOS when using QVTKWidget and QMainWindow
Which Xcode version you use?
terminal this...
Code:
/usr/bin/xcodebuild -version
Re: Qt and VTK graphical issue on MacOS when using QVTKWidget and QMainWindow
I use cmake & Xcode Xcode 7.3.1 osx 10.11.6 el capitan
Build version 7D1014
This error i have to build your code:
Ask error in beautifull new Xcode 7-8
http://www.vtk.org/Wiki/VTK/VTK_6_Mi...equire_defines
If you build your project with CMake, and you use the standard find_package(VTK) and include(${VTK_USE_FILE}) then this problem should not occur. (Because the defines will be automatically added for you by virtue of the include(${VTK_USE_FILE})...) Consider following the guide to using implementation modules, which has fuller details on using implementation modules without using CMake if your project demands it.