I’m not doing that, I’m just moving the Qt widget to an another layout : (by the way, is there a code formatting tag when pasting code in this editor ?)
QWidget* const fullScreenWindow = new QWidget(this, Qt::Window);
m_FullScreenWindow = fullScreenWindow;
fullScreenWindow->setObjectName(“FullScreenWindow”);
‘plots’ and ‘geomap’ are QVTKOpenGLWidget instances, and I remove them from their original layout
plotsLayout->removeWidget(plots);
mapLayout->removeWidget(geoMap);
QHBoxLayout* vbox = new QHBoxLayout(fullScreenWindow);
vbox->setSpacing(0);
vbox->setMargin(0);
and paste them in the full screen widget’s one !
vbox->addWidget(plots);
vbox->addWidget(geoMap);
fullScreenWindow->showFullScreen();
fullScreenWindow->show();
// Handle ESCAPE & F12 buttons : exit full screen mode
QShortcut* esc = new QShortcut(Qt::Key_Escape, fullScreenWindow);
QObject::connect(esc, &QShortcut::activated,
this, &MainWindow::toggleFullScreen);
QShortcut* f12 = new QShortcut(Qt::Key_F12, fullScreenWindow);
QObject::connect(f12, &QShortcut::activated,
this, &MainWindow::toggleFullScreen);
By the way, I took this logic from ParaView !
In fact, I’m using this project : vtkMap (GitHub - OpenGeoscience/vtkMap: vtkMap), I’m using marker clusters that make use of vtkGlyph3DMapper, .
when I move to full screen, the clusters glyph disappears (only the text remains) :
and I got a bunch of these errors non-stop :
ERROR: In /home/febus-g1/rpmbuild/BUILD/ParaView-v5.4.1/VTK/Rendering/OpenGL2/vtkOpenGLVertexArrayObject.cxx, line 311
vtkOpenGLVertexArrayObject (0x8487be0): attempt to add attribute when not ready for attribute GCMCMatrix
ERROR: In /home/febus-g1/rpmbuild/BUILD/ParaView-v5.4.1/VTK/Rendering/OpenGL2/vtkOpenGLGlyph3DHelper.cxx, line 461
vtkOpenGLGlyph3DHelper (0x8a3c140): Error setting ‘GCMCMatrix’ in shader VAO.
ERROR: In /home/febus-g1/rpmbuild/BUILD/ParaView-v5.4.1/VTK/Rendering/OpenGL2/vtkOpenGLVertexArrayObject.cxx, line 311
vtkOpenGLVertexArrayObject (0x8487be0): attempt to add attribute when not ready for attribute glyphColor
ERROR: In /home/febus-g1/rpmbuild/BUILD/ParaView-v5.4.1/VTK/Rendering/OpenGL2/vtkOpenGLGlyph3DHelper.cxx, line 485
vtkOpenGLGlyph3DHelper (0x8a3c140): Error setting ‘diffuse color’ in shader VAO.
I think it’s a bug in QVTKOpenGLWidget. If someone is interested in fixing that bug, I can add the full screen feature in vtkMap’s weather station Qt example.
Otherwise, vtkMap is a great project, I’m sad that there is no people working actively on it
coloring a line with data is easy with VTK, I don’t think it’s easier to do the same with a web based slippy map.