Bug 496919

Summary: Global menu: Not working properly with Qt app's dynamic menus - MusE Sequencer DAW
Product: [Plasma] plasmashell Reporter: Tim E. Real <termtech>
Component: Global Menu widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde, kdedev, mvourlakos, nate
Priority: NOR    
Version First Reported In: 6.2.3   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Tim E. Real 2024-12-02 07:28:10 UTC
SUMMARY
Our Linux Qt app, the MusE Sequencer DAW, does not work properly with the global menu. 

STEPS TO REPRODUCE
Install MusE package or build, https://github.com/muse-sequencer/muse
Run MusE to see what's happening.

OBSERVED RESULT
Global menu is only partially populated, missing several menus.

EXPECTED RESULT
Global menu is fully populated with all menus.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Hello, according to https://community.kde.org/Plasma/Environment_Variables 
 under KDE_NO_GLOBAL_MENU, it says I should report misbehaving apps here. 
I hope you don't mind this Qt app.

MusE uses a sort of hybrid MDI and tabbed window system.
MDI to get a single shared menu bar, and tabbed windows to economize on space.
MusE uses dynamic menus. That is, the main window menu bar changes dynamically
 according which tabbed window is currently visible. Thus at different times the 
 main window menu bar is populated with different menus and items.

In other words, MusE is already doing what Global Menu wants to do - 
 one main window menu for all windows.
Thus I suspect they are kind of counteracting and fighting each other.

I have not delved deep into the issue, but I suspect that KDE Global Menu doesn't
 like our custom dynamic menu system, since the menu bar(s) keep changing.

Does this bug make sense, that is, Global Menu cannot support such dynamic menus?
Or is there something wrong with our app and Global Menu should be fine?

MusE works fine with the KDE_NO_GLOBAL_MENU environment variable set.
Maybe I could try setting the variable from within the app to make it a permanent 
 thing for users, instead of having to put it on the command line. 

Thanks for your consideration.
Comment 1 Tim E. Real 2024-12-13 20:44:42 UTC
Update: We learned about the Qt::AA_DontUseNativeMenuBar flag and have included in the app.
The app now works fine while such global menus are in use.
Although, this means it is unable to participate in these global menus, keeping its own menu system.
Comment 2 TraceyC 2025-09-23 16:18:48 UTC
Thanks for the bug report. I'm sorry we weren't able to get to it until now. From what I understand, the KDE_NO_GLOBAL_MENU is working for the app now. Your most recent question is more of a development question.

Unfortunately here on the bug tracker, we cannot offer help with software development topics not clearly related to bugs in KDE software.  You can find appropriate ways to get in contact with the dev team for assistance with your issue at https://community.kde.org/Get_Involved/development#Communicate_with_the_dev_team.

I'm going to close this out for now. Feel free to reopen it if there is still a bug with issues related to the global menus themselves.