Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED -needed qt5ct ] QT theme doesn't work on hyprland
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
setan
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2024
Posts: 86

PostPosted: Sun Apr 14, 2024 5:46 pm    Post subject: [SOLVED -needed qt5ct ] QT theme doesn't work on hyprland Reply with quote

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
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 425
Location: Naarm/Melbourne, Australia

PostPosted: Mon Apr 15, 2024 12:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2837

PostPosted: Mon Apr 15, 2024 1:27 am    Post subject: Reply with quote

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
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 425
Location: Naarm/Melbourne, Australia

PostPosted: Mon Apr 15, 2024 1:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2837

PostPosted: Mon Apr 15, 2024 2:46 am    Post subject: Reply with quote

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
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 425
Location: Naarm/Melbourne, Australia

PostPosted: Mon Apr 15, 2024 3:23 am    Post subject: Reply with quote

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
View user's profile Send private message
setan
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2024
Posts: 86

PostPosted: Mon Apr 15, 2024 8:21 am    Post subject: Reply with quote

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
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1468
Location: Earth

PostPosted: Mon Apr 15, 2024 8:44 pm    Post subject: Reply with quote

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!

8)
_________________
" 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
View user's profile Send private message
setan
Tux's lil' helper
Tux's lil' helper


Joined: 21 Feb 2024
Posts: 86

PostPosted: Tue Apr 16, 2024 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1468
Location: Earth

PostPosted: Tue Apr 16, 2024 8:30 pm    Post subject: Reply with quote

you're welcome :)

have fun with Gentoo !

8)
_________________
" 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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum