Page 1 of 1

Get respect from QT apps....

Posted: Sat Dec 17, 2022 8:55 am
by manyroads
If, like me, you have been irritated by QT apps rarely respecting dark themes (or any GTK themes), here is a link that will allow you better alignment of your QT apps (like the MX Tools suite) with your dark GTK theme. I know the article says it's for VirtualBox (and it is) but it also fixes all your other QT apps at the same time. :number1:

I just wish it were perfect, but remember: "better is never to be confused with good...." :eek:

Here's the link: https://stukev.com/giving-virtualbox-a-dark-mode/

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 9:05 am
by Eadwine Rose
To avoid everything here to become "look at this - link", can you please also post the content in question? Thanks!

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 9:15 am
by manyroads
It's not my content to post... @Eadwine Rose

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 9:18 am
by Eadwine Rose
You posted the source already, as long as that is included.

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 10:59 am
by AVLinux
Wait, are you talking about qt5ct? Isn't that in common use for years already? I've been using it and including it in spins for years.. In many circles it seems that it has already been superceded by kvantum but I've never tried that..

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 11:08 am
by kobaian
As far as I remember the default value of QT_QPA_PLATFORMTHEME in MX-Linux is "gtk2" and that's why there is no problem for theming the majority of apps under XFCE or Fluxbox, because most of the available gtk themes are both gtk2 and gtk3. The only problematic QT-app I use is XnView MP that uses "fusion" instead of "gtk2". And if you want to have fusion themes that match your gtk themes qt5ct is probably the best solution. But you have to remember that for the best effect you have to set not only the color-palette, but also fonts, icons etc.
Qt5ct is a really powerful tool that helps theming QT apps outside of the KDE environment. It's capabilities are much greater than only applying a dark theme. IYou can manage a lot of diffrent themes: gtk2, fusion, motiv and even kvantum, if you have installed the kvantum package before. And using kvantum themes you can make your XFCE or MX-Fluxbox environment looking as fancy, as KDE, like on the picture below. (It's MX-Fluxbox with PCmanFM-qt with an oldschool aqua-brushed-metal theme.)

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 1:04 pm
by manyroads
FWIW. The apps I use that benefit from this fix include:
Virtualbox
calibre
MX Tools

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 3:25 pm
by FullScale4Me
manyroads wrote: Sat Dec 17, 2022 1:04 pm FWIW. The apps I use that benefit from this fix include:
Virtualbox
calibre
MX Tools
VirtualBox 7.0.4 has figured out that some of us like it dark [without the 'fix' BTW], unlike the previous version I upgraded from via MX Package Installer.

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 5:18 pm
by manyroads
FullScale4Me wrote: Sat Dec 17, 2022 3:25 pm
manyroads wrote: Sat Dec 17, 2022 1:04 pm FWIW. The apps I use that benefit from this fix include:
Virtualbox
calibre
MX Tools
VirtualBox 7.0.4 has figured out that some of us like it dark [without the 'fix' BTW], unlike the previous version I upgraded from via MX Package Installer.
Only true if you are running using a DE or a desktop preset to deal with the issue... I am not. :eek:

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 5:31 pm
by Stevo
FullScale4Me wrote: Sat Dec 17, 2022 3:25 pm
manyroads wrote: Sat Dec 17, 2022 1:04 pm FWIW. The apps I use that benefit from this fix include:
Virtualbox
calibre
MX Tools
VirtualBox 7.0.4 has figured out that some of us like it dark [without the 'fix' BTW], unlike the previous version I upgraded from via MX Package Installer.
Is that 7.0.4 direct from Oracle or the Debianized 7.0.4 in our test repositories?

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 8:09 pm
by davidy
I tried adding the command to my .profile that manyroads suggested in his link and qt5ct keeps telling me the environment variable is still set to gtk2 instead of qt5ct/"configured incorrectly".
How do I add the line:
export QT_QPA_PLATFORMTHEME=qt5ct
to my ~/.profile file correctly so that it works and points to the qt5ct variable instead of gtk2? Stupid question I know but the directions just say, "add this to the file and then set the palette to custom in qt5ct". Calibre needs a simple dark theme for sure.

No worries. I removed qt5ct. Calibre has a dark color scheme built-in. Qt5ct menu reminds me of the gtk one in windows though the gtk windows menu was easy to use comparatively speaking. Carry on.

Re: Get respect from QT apps....

Posted: Sat Dec 17, 2022 9:42 pm
by FullScale4Me
Stevo wrote: Sat Dec 17, 2022 5:31 pm
FullScale4Me wrote: Sat Dec 17, 2022 3:25 pm
manyroads wrote: Sat Dec 17, 2022 1:04 pm FWIW. The apps I use that benefit from this fix include:
Virtualbox
calibre
MX Tools
VirtualBox 7.0.4 has figured out that some of us like it dark [without the 'fix' BTW], unlike the previous version I upgraded from via MX Package Installer.
Is that 7.0.4 direct from Oracle or the Debianized 7.0.4 in our test repositories?
That was from the MX Test Repository. It was run as an upgrade [KDE] against an install of several VBox Appliances. It glitched once when saving edited 'System' settings: 'TMP - None, 1.2, 2.0' and 'Enable Secre Boot' both of which were new. An uninstall & Install of the MX Test Repo 7.0.4 on XFCE had one Appliance, no issues.

Re: Get respect from QT apps....

Posted: Sun Dec 18, 2022 9:10 am
by manyroads
I'll have to defer from the discussion... my simple reason is I use a totally non-standard setup. I run 3 window managers from a single user-space (i3wm, openbox, dwm). I do NOT run any Desktop environment. I am also on AHS running an Intel 12-gen chip (i5). FWIW. I can tell everyone that I use only MX standard repos EXCEPT when I compile my code.