View previous topic :: View next topic |
Author |
Message |
setan Tux's lil' helper
Joined: 21 Feb 2024 Posts: 86
|
Posted: Sun Apr 14, 2024 5:46 pm Post subject: [SOLVED -needed qt5ct ] QT theme doesn't work on hyprland |
|
|
Hello,
I am running hyprland.
I have set GTK theme with nwg-look and it works perfectly.
I was trying to set the QT theme using QT6ct. The app window itself works, but when I lanuch kid3-qt or keepassxc with native look, they are just white.
In my hyprland config i have those lines:
Code: | env = XDG_SESSION_DESKTOP, Hyprland
env = QT_QPA_PLATFORM, wayland
env = QT_QPA_PLATFORMTHEME, qt6ct
|
If i set QT_STYLE_OVERRIDE qt6ct warns me about the override an i only the top bar is the right color (icons are still for light mode).
Does anyone know why this happens?
Last edited by setan on Tue Apr 16, 2024 6:58 am; edited 1 time in total |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 449 Location: Naarm/Melbourne, Australia
|
Posted: Mon Apr 15, 2024 12:22 am Post subject: |
|
|
Are all of the Qt apps you're running Qt6 apps? For example, i'm using KeepassXC on Wayfire, and running `lddtree` shows that it's linked against Qt5. i imagine there are other apps still needing to be updated to Qt6 by upstreams. So you could try running qt5ct instead of qt6ct, to check if that makes any difference. |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2852
|
Posted: Mon Apr 15, 2024 1:27 am Post subject: |
|
|
flexibeast wrote: | Are all of the Qt apps you're running Qt6 apps? For example, i'm using KeepassXC on Wayfire, and running `lddtree` shows that it's linked against Qt5. i imagine there are other apps still needing to be updated to Qt6 by upstreams. So you could try running qt5ct instead of qt6ct, to check if that makes any difference. | To add to this, qt6ct also activates when THEME is set to "qt5ct" so that both can be used at same time without needing to juggle the env vars between applications. |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 449 Location: Naarm/Melbourne, Australia
|
Posted: Mon Apr 15, 2024 1:58 am Post subject: |
|
|
Ionen wrote: | qt6ct also activates when THEME is set to "qt5ct" so that both can be used at same time without needing to juggle the env vars between applications. |
Ah, so i could change the "Qt" wiki page from saying:
Quote: | Themes, as well as things such as preferred fonts, can then be selected by running qt5ct. |
to:
Quote: | Themes, as well as things such as preferred fonts, can then be selected by running qt5ct and/or qt6ct; the theming of individual applications depends on whether they were linked against Qt5 or Qt6. Note that setting <var>QT_QPA_PLATFORMTHEME</var> to <code>qt5ct</code> is sufficient to activate theming of Qt6 applications; it's not necessary to set that variable to <code>qt6ct</code> in such cases. |
? |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2852
|
Posted: Mon Apr 15, 2024 2:46 am Post subject: |
|
|
Sure, that sounds good, thanks.
The ebuild also make a note about this in the postinst message (on first emerge only) but having more places to read about it always helps in case it was missed. |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 449 Location: Naarm/Melbourne, Australia
|
Posted: Mon Apr 15, 2024 3:23 am Post subject: |
|
|
Done.
Ah, okay. i've never used the KDE desktop, and only use a few Qt-based apps, so i've not paid as much attention to Qt stuff as i probably should have - i've been working on the wiki page recently to document my current understanding of things. |
|
Back to top |
|
|
setan Tux's lil' helper
Joined: 21 Feb 2024 Posts: 86
|
Posted: Mon Apr 15, 2024 8:21 am Post subject: |
|
|
I have set Code: | env = QT_QPA_PLATFORMTHEME, qt5ct | and logged in and out. The apps are still white.
Restarting did not change that. |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1468 Location: Earth
|
Posted: Mon Apr 15, 2024 8:44 pm Post subject: |
|
|
please try the dotfile options from https://github.com/prasanthrangan/hyprdots
just tried on Endeavour OS with Hyprdots installed - it works somehow.
look at Hyprdots qt5ct and qt6ct folders and the qt settings in .config/hypr/hyprland.conf.
Code: | env = QT_QPA_PLATFORM,wayland
# env = QT_STYLE_OVERRIDE,kvantum
env = QT_QPA_PLATFORMTHEME,qt6ct
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_AUTO_SCREEN_SCALE_FACTOR,1 |
you need to emerge x11-misc/qt5ct and gui-apps/qt6ct to be able to use the settings from Hyprdots.
also, activate hyprland logging temporarily in your hyprland.conf:
Code: | debug:disable_logs = false
debug:enable_stdout_logs = false |
the log is in /tmp/hypr folder and look for QT specific outputs / errors!
_________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
setan Tux's lil' helper
Joined: 21 Feb 2024 Posts: 86
|
Posted: Tue Apr 16, 2024 6:58 am Post subject: |
|
|
CooSee,
thank you for mentioning qt5ct. I was under the impression that cat6ct takes care of all the older versions, but it doesn't (for me).
After emerging qt5ct relogging, the apps have the theme that I have chosen. |
|
Back to top |
|
|
CooSee Veteran
Joined: 20 Nov 2004 Posts: 1468 Location: Earth
|
Posted: Tue Apr 16, 2024 8:30 pm Post subject: |
|
|
you're welcome
have fun with Gentoo !
_________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
|
|