Bug 448078 - Global Menu does not work in Qt6
Summary: Global Menu does not work in Qt6
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu (show other bugs)
Version: 5.23.5
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
: 455155 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-07 17:26 UTC by SoilpH96
Modified: 2024-02-06 17:50 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SoilpH96 2022-01-07 17:26:32 UTC
SUMMARY
Global menu does not appear when using a Qt6 application in a Wayland session

STEPS TO REPRODUCE
1. Start Plasma Wayland.
2. Open any Qt6 application (tested on Qbittorrent 4.4)

OBSERVED RESULT
The global menu is not rendered. The menu in application windows is also not rendered, unlike a similar bug (Bug 424485) affecting GTK applications on Wayland. The global menu is correctly rendered for applications running on XWayland.

EXPECTED RESULT
The menu should be rendered properly, as with Qt5 apps.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.89.0
Qt5 Version: 5.15.2
Qt6 Version: 6.2.2
Kernel Version: 5.15.13-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-01-12 17:27:04 UTC
KDE software hasn't been ported to Qt6 yet. It will be, eventually. :)
Comment 2 phrxmd 2022-08-26 11:48:10 UTC
*** Bug 455155 has been marked as a duplicate of this bug. ***
Comment 3 phrxmd 2022-08-26 11:50:55 UTC
I'm reopening this because (with all due respect) I think this is not about porting KDE applications to Qt6, but about making sure that in the meantime Qt6 applications show at least SOME kind of menu, even if the Global menu currently doesn't support them.

I'm seeing the same behaviour with Qt6 applications: the app window doesn't contain a menu, the global menu doesn't show anything, it's as if the menu got swallowed somewhere.
Comment 4 gudvinr+kde 2022-12-21 22:25:46 UTC
Also happens with OBS Studio
Comment 5 gudvinr+kde 2023-01-08 16:51:15 UTC
Since there's more and more Qt6 apps popping up and old ones getting update I think this issue starts being very relevant. It's not about global menu but rather about Qt6 apps not having ANY menu at all.

I agree with phrxmd. If there's no way to support global menu right now, those apps at least should not have regular menu removed. This, for example, happens with electron apps like VS Code.
Comment 6 Naxdy 2023-01-15 19:53:48 UTC
(In reply to gudvinr+kde from comment #5)
> Since there's more and more Qt6 apps popping up and old ones getting update
> I think this issue starts being very relevant. It's not about global menu
> but rather about Qt6 apps not having ANY menu at all.
> 
> I agree with phrxmd. If there's no way to support global menu right now,
> those apps at least should not have regular menu removed. This, for example,
> happens with electron apps like VS Code.

Electron apps such as VSCode are GTK apps at their core, and as such are not affected by this bug, but rather this one: https://bugs.kde.org/show_bug.cgi?id=424485
Comment 7 phrxmd 2023-05-17 06:33:28 UTC
Electron apps aside, I can still reproduce this with Qt6 apps such as Telegram Desktop and qBittorrent.

Steps to reproduce:
1. Launch app with QT_QPA_PLATFORM=xcb → menu appears in the Global Menu applet
2. Launch app with QT_QPA_PLATFORM=wayland → no menu at all (neither in the Global Menu applet nor in the app window).
Comment 8 Nate Graham 2023-06-03 18:33:55 UTC
Can confirm.
Comment 9 David Edmundson 2023-06-05 14:02:40 UTC
Relevant work: https://codereview.qt-project.org/c/qt/qtbase/+/481436  


We're trying to move away from our fork of the menu code to using Qt's directly, we just have to add on this little bit
Comment 10 Robby Engelmann 2023-11-30 11:51:57 UTC
Is there any progress? Using MegaRelease beta1 from master git builds under openSUSE Tumbleweed still does not show any global menu in the window decoration.
Comment 11 John 2024-02-05 16:50:48 UTC Comment hidden (spam)
Comment 12 Nate Graham 2024-02-05 19:48:05 UTC Comment hidden (spam)
Comment 13 Nate Graham 2024-02-05 19:48:43 UTC
(In reply to Robby Engelmann from comment #10)
> Is there any progress? Using MegaRelease beta1 from master git builds under
> openSUSE Tumbleweed still does not show any global menu in the window
> decoration.

This is something else; please submit a new bug report for it.
Comment 14 Nate Graham 2024-02-05 19:50:24 UTC
As originally described, this issue appears to be fixed now. I can get a proper global menu for all the Qt 6 apps I tried with current git master of everything KDE--including Plasma 6. I suspect the original issue was caused by library version and compatibility mismatches stemming from using Qt apps in Plasma 5, which was Qt5-based.
Comment 15 Naxdy 2024-02-05 20:31:05 UTC
If you're on a distro that allows you to backport the libraries you need (e.g. NixOS), the packages you need are: plasma-integration, kio, kio-extras. With these, qt6 apps have functioning global menus in Plasma 5. If not, just wait for Plasma 6 release, which is guaranteed to fix this issue anyway.
Comment 16 John 2024-02-06 10:11:39 UTC
(In reply to Nate Graham from comment #12)
> If there was an update, you'd see it here.

I'm sorry. It's not the first time devs are busy fixing bugs and don't have the time to come up and post || close the related bug report, hence my question.

Also, when you say "As originally described" i don't see "where" it was described...
(it's an honest question - not a provocation of anykind - because i might not be looking in the right places and asking questions i could find answers to myself)
Comment 17 Robby Engelmann 2024-02-06 13:46:40 UTC
I can confirm, it works here:
Operating System: openSUSE Tumbleweed 20240205
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.1
Kernel Version: 6.7.2-1-default (64-bit)
Graphics Platform: Wayland
Processors: 20 × 13th Gen Intel® Core™ i7-13700H
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: TUXEDO
Product Name: TUXEDO InfinityBook Pro Gen8 (MK1)
Comment 18 Nate Graham 2024-02-06 17:50:59 UTC
(In reply to John from comment #16)
> (In reply to Nate Graham from comment #12)
> > If there was an update, you'd see it here.
> 
> I'm sorry. It's not the first time devs are busy fixing bugs and don't have
> the time to come up and post || close the related bug report, hence my
> question.
> 
> Also, when you say "As originally described" i don't see "where" it was
> described...
> (it's an honest question - not a provocation of anykind - because i might
> not be looking in the right places and asking questions i could find answers
> to myself)
You're good, sorry I was a bit snippy. In this case the ping was in fact useful because the issue is resolved for Plasma 6, but the status hadn't been updated to reflect that!

"As originally described" was referring to the original description of the bug report, written by SoilpH96. What they described is fixed now for Plasma 6.