MenuBar menus are hidden when QQuickWidget is set as central widget (Windows)
-
For some reason the menus in the menubar are not visible during the application run (see image)
As you can see the menus exist and are correctly configured (and they work).
The grey bar you see just under the menubar is a QQuickWidget (i think this might be the problem as i've created a test project and just by setting the central widget to be a QQuickWidget and adding a menu with:
ui->menuBar->addMenu("File"); ui->menuBar->addMenu("Test");
after the
ui->setupUi(this);
causes the same exact problem. Is this a known issue?Qt version:
5.10.1 MSVC2015_32bit
.On linux, all is well
-
Hi,
Do you mean that if you don't have the QQuickWidget the toolbar content is visible but disappear as soon as QQuickWidget is there ?
-
@nwoki
how did you add your QQuickWidget to the main-window exactly? Did you useQMainWIndow::setCentralWidget()
? -
@SGaist yes, without the QQuickWidget the toolbar is visible. You can try it out yourself with a new project and just adding the central widget and creating the menu items as above. This behaviour is present only on windows.
@raven-worx using the designer tool. And yes, it's set as the central widget with a Vertical layout -
Ok, I found out that when running with the default integrated video card driver, Qt was having problems. I set my nvidia card to be used as default and now the menubar is correctly visualized. For some reason qt is having trouble with the intel integrated graphics card driver (Intel HD Graphics 530).