QT6 Context Menu and Menu bar issue

System info: https://0x0.st/HhE0.txt
(Linux 6.7.9-zen1-1-zen, i3-wm, lightdm, picom)

I have been having issues with the context menus in some QT6 applications.
qBittorrent:
image

Dolphin Emu:
image

I suspect this could be related to my theming. I have tried with/without picom and the result is the same.

I use Kvantum to theme applications and use the materia theme. Both qt5ct and qt6ct are set to use kvantum.

In Kvantum and lxappearance, the theme is set to MateriaDark.
/etc/environment:

# QT theme and KDE apps plugins
#QT_STYLE_OVERRIDE=kvantum
QT_QPA_PLATFORMTHEME=qt5ct
QT_PLUGIN_PATH=/home/user/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/

# Other
GTK_USE_PORTAL=1

Before I had last updated the system, this issue was bypassed by added the following stylesheet to qt5ct or qt6ct:

QMenu {
    border: none;
}

But this does not look as it should.

Something else which may be of note is that the password prompt which is spawned when using pkexec does not have the correct theming applied:
image
This was also not the case before the last update.

I can provide other files, logs etc. as needed.

Thanks in advance :slight_smile:

Do you have poklit-qt6 installed?

What if you were to launch dolphin-emu from the command line like this:

$ QT_QPA_PLATFORMTHEME=qt6ct dolphin-emu

Does the issue still occur?

P/S: Is that Kozakura from Otherside Picnic in your avatar?

Do you have poklit-qt6 installed?

Yes. I have both polkit-qt5 and polkit-qt6
image

What if you were to launch dolphin-emu from the command line like this:
QT_QPA_PLATFORMTHEME=qt6ct dolphin-emu
Does the issue still occur?

Yes, with either QT_QPA_PLATFORMTHEME=qt6ct or QT_QPA_PLATFORMTHEME=qt5ct used as shown, the context menu will be as pictured.

Is that Kozakura from Otherside Picnic in your avatar?

Yes :smiley: (although I haven’t read or watched it, I just like this picture for now)

Are other themes affected?

You can also try to configure the themes using Kvantum alone by setting the environment variable

QT_STYLE_OVERRIDE=kvantum
#QT_QPA_PLATFORMTHEME=qt5ct

Note that the QT_QPA_PLATFORMTHEME entry is commented out. After that, you can set your themes with kvantummanager or by editing the config file ( ~/.config/Kvantum/kvantum.kvconfig) directly.

I’ve watched the anime. I liked it. Unfortunately, I think it was discontinued after season 1. The lightnovels are good too.

Are other themes affected?

Yes, that seems to be the case. I tried a few others through Kvantum just now, same result.

It seems disabling “GUI Effects” in qt5ct, qt6ct and Kvantum makes some items show more consistently. Context menus seem to almost always show but sub-menus of the context menu are inconsistent.

I should also mention that items in the menu bar also act this way:
image vs image

try to configure the themes using Kvantum alone by setting the environment variable QT_STYLE_OVERRIDE=kvantum

Seems to have no change to this issue (but it did prevent the PolKit QT GUI from spawning, it fell back to the terminal PolKit prompt but it doesn’t work. That’s probably its own issue, not too important)

I’ve watched the anime. I liked it. Unfortunately, I think it was discontinued after season 1. The lightnovels are good too.

That is unfortunate. At least the light novels are good, it’s not just a case of an entire story being discontinued.

Even the non-kvantum themes? If I remember correctly, qt6ct comes with its own default color schemes.

Even the non-kvantum themes? If I remember correctly, qt6ct comes with its own default color schemes.

Now you’re onto something. I changed the theme in qt6ct to “Breeze” and the issue is no longer present.

So the issue is either with Kvantum or maybe even the materia theme itself.

Yes, I suspect so. It might be worth checking out the theme’s github page to see if there’s an open issue there.

The manga is still ongoing, as far as I know. I confess, when I saw Kozakura’s multiple monitor setup, I thought it was cool. I rmb asking myself if she was running Arch or Gentoo. Anything but Windoze.

Yes, I suspect so. It might be worth checking out the theme’s github page to see if there’s an open issue there.

It seems to be with some option I had enabled in Kvantum. I have disabled everything in these settings:
image

I’ll go through them, enabling them per my preference and see which breaks it and mention it here when I find it.

Thanks for the help @anthony93 !!

No problem. Hopefully you’re able to resolve this issue.

I have this issue of menus appearing cutoff sometimes in plasma 6. I thought it was nvidia problem though, didn’t look into it after that. I’ll file a bug report if one hasn’t been filed already.

I may have spoken to soon :smile: Although it was working perfectly 5 minutes ago, when going through and enabling options, I enabled GUI effects once again and the issue reappeared. “That’s fine”, I thought, it was probably part of the issue but disabling it had no change.

Maybe I’ll need to log out and back in again but for now it’s back. I’ll keep this updated regardless.

EDIT:

Just watching this video, noticed this:
image

Same issue

This seems to have been fixed in Qt 6.7
(I think, I’m not sure how they described this bug but there are items in this release note about issues with context menus.)

I’ll mark this as a solution anyway as it can be fixed by updating to the latest version of Qt

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.