Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Qt6 Gui Broken on Artix runit Mate (Read 2763 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Qt6 Gui Broken on Artix runit Mate

Hello all,

It seems that with the introduction of qt6, all programs that use qt6 are broken. For me, this includes qsynth, qjackctl, qtractor, and cmake-gui. When running these applications from the shell, this is the error that is printed to me:

Code: [Select]
QApplication: invalid style override 'gtk' passed, ignoring it.
Available styles: qt6ct-style, Windows, Fusion

Here is what qsynth looks like:



What can I do about fixing this? These applications are all unusable.


Re: Qt6 Gui Broken on Artix runit Mate

Reply #2
Okay, I have gone to /etc/environment and commented out QT_STYLE_OVERRIDE and set QT_QPA_PLATFORMTHEME=qt6gtk2 after installing it from the aur. I still have mangled qt6 windows (although now they are the same colors as my system). Is there anywhere else I need to check to unmangle qt6? I would try to play with qt6ct, but it is also mangled like in the image.

As a side issue, setting QT_QPA_PLATFORMTHEME=qt6gtk2 removes qt5's styling (although this is not a big issue as the applications are still usable).

Re: Qt6 Gui Broken on Artix runit Mate

Reply #3
I don't think some of the developers bothered some dead gtk2. So probably nothing like qt6-styleplugins will be realised.

However, because qt6 is still not ready (certainly not 6.0.x), the situation may improve over time.  however, since it is planned to remove gtk2 (not only from archlinux), gtk2 support by another toolkits will probably not be much better ...


did you try QT_QPA_PLATFORMTHEME=qt6ct ?

Re: Qt6 Gui Broken on Artix runit Mate

Reply #4
I just tried setting QT_QPA_PLATFORMTHEME=qt6ct. With this, the theme is back to a "stock" qt theme (the very bright white theme), but the gui is still garbled. I think the issue doesn't have to do with the variables.

Is there a good way to say get rid of qt configs to see if that is causing the issue? Also, does qt6 share configs with qt5 at all?


Re: Qt6 Gui Broken on Artix runit Mate

Reply #6
Hmmm, I'm a little stumped as to what to do. I will try to see if removing config files will fix the gui, but if anyone else knows any better suggestion, I will gladly take it. Maybe the best thing to do would be reach out to qt6 folks?

Re: Qt6 Gui Broken on Artix runit Mate

Reply #7
QT_QPA_PLATFORMTHEME=qt5ct works with qt6ct and  the qt6gtk2 AUR package as below:



kvantum does not seem to be supported yet.

Re: Qt6 Gui Broken on Artix runit Mate

Reply #8
That's good to know for keeping themes across qt5 and qt6.

Unfortunately, it seems my problem is not related to these variables. I'll keep this in mind, once I fix qt6 to keep theming correct. Currently, this is what qt6ct looks like:



Here is what my environment variables look like in /etc/environment:
Code: [Select]
QT_QPA_PLATFORMTHEME=qt6gtk2
#QT_QPA_PLATFORMTHEME=gtk2
#QT_STYLE_OVERRIDE=gtk


Re: Qt6 Gui Broken on Artix runit Mate

Reply #10
Thank you, I will change the environment variable.

However, I found what the issue was that was causing the broken qt6 problem.

Mate desktop has an auto hidpi scaling feature that was causing certain applications (qt6 and obs) to render incorrectly when using the nvidia card output. To fix it, I used mate-tweak, and adjusted the hidpi from Auto-Detect, to Regular, and it fixed the guis. This also resizes gtk correctly, as for some reason it was slightly smaller.

It was not a qt environment variable at all, but mate was causing it! Thank you all for your help on this and teaching me about qt environment variables!

Re: Qt6 Gui Broken on Artix runit Mate

Reply #11
Is incorrect, so change it to:
Code: [Select]
QT_QPA_PLATFORMTHEME=qt5ct

or to:
Code: [Select]
QT_QPA_PLATFORMTHEME=qt6ct

Although this is unrelated to the issue, I just wanted to post this from the github page of qt6gtk2. They actually recommend to export that variable, which is where I got it from. It does theme your qt6 applications, so it did work for me:

Quote
Add line 'export QT_QPA_PLATFORMTHEME=qt6gtk2' to ~/.profile and re-login.
Alternatively, create the file /etc/X11/Xsession.d/100-qt6gtk2 with
the following line:

export QT_QPA_PLATFORMTHEME=qt6gtk2

Re: Qt6 Gui Broken on Artix runit Mate

Reply #12
Yup, but on this way, you have to change any theme by hand, and not by qt5ct or qt6ct.


have fun ;)

 

Re: Qt6 Gui Broken on Artix runit Mate

Reply #13
That makes more sense, thanks!