Qt Creator Menus Disappearing
Running Qt Creator 4.2.1, Built on Jan 20 2017 01:20:15, From revision 7071b61e02
on Ubuntu 14.04.
Top menu bar (File, Edit, Build, etc.) disappear and no Alt+F, etc. work when this happens.
At times, exiting Qt Creator and relaunching it gets them back. Other times only a reboot gets them back.
A known issue ?
Is there a fix ?
I am having exactly the same problem on Ubuntu 14.04 with Qt creator 4.2.1 ( same revision you are using)
This maybe a bug?
Other apps I use don't have the issue, so I don't think it's Ubuntu related.
removing appmenu-qt5 will solve your issue.
sudo apt-get remove appmenu-qt5
Just removed it. We'll see how it goes.
Thanks, @Ni-Sumi, but removing appmenu-qt5 did not solve the issue.
then I have no idea, Seems yes it is bug.
Yes, @Ni-Sumi, I looked at the bug report. Last entry:
James (inisheer) wrote on 2017-03-13: #28 Fresh installation of Ubuntu 16.04LTS (Unity) and QT Creator v5.8. The UI menu appears when opening a project which defaults to source code edit. **The menu disappears when shifting to UI layout / designer. Returning to source code edit, the menu fails to reappear.** I have tried the "workaround", which does not work... around..
This is the behavior I noticed since I started this thread.
So it is a confirmed bug.
This bug still persists and as far as I can see from the bug report it dates back to 2014-04-14, with the last entry being on 2017-03-13.
3 years now ???
This is quite irritating. It basically renders the GUI Designer unusable.
Does anyone have an update on this issue ??
So it is a confirmed bug.
Yes, it's a Unity bug (the one cited by @Ni-Sumi I mean). I haven't ever experienced anything of the sort, but then I have never used Unity.
Thanks, kshegunov, but I cannot think/believe it's a bug with the Unity desktop.
No other application I use has the issue, and all of them are running under Unity.
Well, on the bugreport (cited above) there is other software that have the same problem. But in any case could you try another window manager?
I was just thinking...
I don't believe I saw this issue until after I did an update of Qt.
Well... I installed Gnome and the menus appear through it.
I don't particularly care for the look of it... It would require moving/resizing widgets on all the dialogs of the app.
there is other software that have the same problem
Please notice on the bug report cited it was also happening with Gnome3, KDE, XMonad, etc. An app included in the list is VLC. VLC is a Qt-based app. A couple of other apps are listed there as well.
So... With all due respect, I reaffirm...
This is a bug in Qt itself... Not a specific window manager.
Just to be sure one thing is clear:
appmenu-qt5is not part of Qt 5.
It is stated on the bug report that eventually it would be completely removed, anyway. I have removed it, but it didn't fix the issue. Also, based on the bug report, there doesn't appear to be any progress toward resolving the issue.
As far as I recall there was a option to not move menu to the unity thing.
(a unity option)
That would might cure Creator not working.
It also seems possible to make it work. ( I understand u might like unity)
But seems it only worked in 3.6 Creator.
Did not test it though as i use anything but unity.
I have tried both options on the menu placement. One option is the "global" position as you mention (the main top bar). The other option is to place the menus in the windows' title bar. I have tried both options and neither solves the issue.
With all due respect, I reaffirm...
You can't reaffirm, unless you can show it's a bug in Qt's menu classes/integration. And it doesn't appear you can if it works okay on gnome and there are other Qt applications that work fine on Unity. Either the WM or the application is doing something fishy with the menu as I see it. Feel free to search for open reports on Qt's bugtracker, as the cited one above is for Ubuntu, not for Qt.
You can't reaffirm, unless you can show it's a bug in Qt's menu classes/integration.
This indicates it's the way the menu classes/integration is being implemented.
From that report:
Qt Creator 4.2.2 Based on Qt 5.8.0 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit) Built on Apr 3 2017 04:08:21 From revision 991f5eb6a5 Edit: My work around is to not open it with the Default Form Editor, but right click on the .ui file and "Open With->Qt Designer"
I have tested the above and can verify that method does work... The menus are displayed that way.
Consider it reaffirmed... Again.
And also from the above mentioned report:
As far as I can see, the only things that Qt Creator does is menuBar = new QMenuBar; and then mainWindow->setMenuBar(menuBar); (not this exact code, but effectively). And then integrating the Designer form editor, and the menu bar that a main window in the form editor has then creates this issue. Regarding QMainWindows: We create lots of them, also as child of the main Qt Creator window. Designer's form editor is put into a QMainWindow, which itself is embedded (through some layers of "normal" widgets) into Qt Creator's main QMainWindow. None except the single main Qt Creator window gets a menuBar set though.