You are not logged in.

#1 2024-12-06 09:59:48

chelmi00
Member
Registered: 2024-05-16
Posts: 9

[SOLVED] Qt6ct not acting as expected on gtk app in i3wm

In my I3WM I love using KDE apps (especially dolphin), therefore I need to use qt6ct (as qt5ct isn't working at all). I also need the dark mode, and here comes the issue.

Situation

I have qt6ct, systemsettings, lxappearance... installed. I open dolphin and it appears with white background. I open qt6ct, and start pressing everywhere, after 20 (or so) buttons pressed, dolphin turns into a dark mode, but I have to repeat the proccess for every window I open. As you can see, it differs in the main zone:
https://upm365-my.sharepoint.com/:i:/g/ … A?e=b5l3Gv

$ cat ~/.config/qt6ct/qt6ct.conf
[Appearance]
color_scheme_path=/home/chelmi/.config/qt6ct/colors/dark.conf
custom_palette=true
icon_theme=breeze-dark
standard_dialogs=default
style=Breeze

[Fonts]
fixed="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"

[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=/home/chelmi/.config/qt6ct/qss/dolphin_head.qss, /usr/share/qt6ct/qss/scrollbar-simple.qss
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3

[PaletteEditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3h\0\0\x2&\0\0\x5\xe2\0\0\x4R\0\0\x3j\0\0\x2@\0\0\x5\xe0\0\0\x4P\0\0\0\0\0\0\0\0\a\x80\0\0\x3j\0\0\x2@\0\0\x5\xe0\0\0\x4P)

[QSSEditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x4o\0\0\x2\x18\0\0\x6\xf5\0\0\x4&\0\0\x4q\0\0\x2\x32\0\0\x6\xf3\0\0\x4$\0\0\0\0\0\0\0\0\a\x80\0\0\x4q\0\0\x2\x32\0\0\x6\xf3\0\0\x4$)

[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\xc7\0\0\0\f\0\0\x5\x99\0\0\x4\x10\0\0\x3\xc8\0\0\0\r\0\0\x5\x98\0\0\x4\xf\0\0\0\0\0\0\0\0\a\x80\0\0\x3\xc8\0\0\0\r\0\0\x5\x98\0\0\x4\xf)

[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()


$ cat ~/.config/qt6ct/qss/dolphin_head.qss
QWidget {
    color: #ffffff;
    background-color: #282c34;
}
QScrollBar {
    background: #323640;
    width: 15px;
}


$ cat ~/.gtkrc-2.0
include "/home/chelmi/.gtkrc-2.0.mine"
gtk-theme-name="Adapta-Nokto-Maia"
gtk-icon-theme-name="Papirus-Dark-Maia"
gtk-font-name="Cantarell 11"
gtk-cursor-theme-name="Maia-Cursor"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"
gtk-xft-rgba="rgb"


$ cat ~/.config/kdeglobals
[...]
[General]
ColorScheme=Maia Dark
[Icons]
Theme=Papirus-Dark-Maia
[KDE]
LookAndFeelPackage=org.kde.oxygen

I have thought that systemsettings or lxappearance could be the reason for this failing, but I cannot resolve how.




SOLUTION:
Adding to ~/.config/dolphinrc:

[UiSettings]
ColorScheme=Breeze Dark

Last edited by chelmi00 (2024-12-08 23:54:40)

Offline

#2 2024-12-06 10:48:11

kermit63
Member
Registered: 2018-07-04
Posts: 287

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

I don't use I3wm, although I use some qt apps with XFCE. In my case, I had to add the following to /etc/environment:

QT_QPA_PLATFORMTHEME=qt6ct

Note that some qt apps like VLC have not upgraded to qt6, so this will not have any effect on those apps.

EDIT: I think you need to log out and log back in for the changes to take effect.

Last edited by kermit63 (2024-12-06 10:56:51)


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Online

#3 2024-12-06 11:03:22

chelmi00
Member
Registered: 2024-05-16
Posts: 9

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

Hi, I have that info in my profile, therefore

$ echo $QT_QPA_PLATFORMTHEME $XDG_CURRENT_DESKTOP
qt6ct i3

In my case, dolphin gets triggered by qt6ct, but it only happens when I play around with the qt6ct app. Do you know what I mean?

Offline

#4 2024-12-06 13:20:11

chelmi00
Member
Registered: 2024-05-16
Posts: 9

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

Here is a video on what is really happening
https://upm365-my.sharepoint.com/:v:/g/ … 0&e=UHvBHq
It happens every time. Even openning dolphin after doing it, also goes white

Offline

#5 2024-12-06 18:21:04

kermit63
Member
Registered: 2018-07-04
Posts: 287

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

The only difference between your settings and mine is I'm using Fusion instead of breeze. Beyond that I have no more ideas on what's causing the problem.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Online

#6 2024-12-07 18:04:30

chelmi00
Member
Registered: 2024-05-16
Posts: 9

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

Everything stays the same with Fusion, so it doesn't look good for me haha.

Offline

#7 2024-12-07 21:56:02

seth
Member
Registered: 2012-09-03
Posts: 60,776

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

@kermit63, are you also using stuff like

stylesheets=/home/chelmi/.config/qt6ct/qss/dolphin_head.qss, /usr/share/qt6ct/qss/scrollbar-simple.qss

?

Offline

#8 2024-12-07 22:18:54

kermit63
Member
Registered: 2018-07-04
Posts: 287

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

My ~/.config/qt6ct/qss folder is empty.

/usr/share/qt6ct/qss/scrollbar-simple.qss is present, but I don't remember creating it. It's possible I may have created it though, since there was a time when I did some heavy customizations of qt apps when qt6 was first released.

For reference, here is my ~/.config/qt6ct/qt6ct.conf:

[Appearance]
color_scheme_path=/usr/share/qt6ct/colors/darker.conf
custom_palette=true
icon_theme=Numix-Circle
standard_dialogs=default
style=Fusion

[Fonts]
fixed="Ubuntu Mono,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
general="Ubuntu,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"

[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1200
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3

[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x4n\0\0\x1\xb1\0\0\aL\0\0\x4\x16\0\0\x4n\0\0\x1\xd3\0\0\aL\0\0\x4\x16\0\0\0\0\0\0\0\0\a\x80\0\0\x4n\0\0\x1\xd3\0\0\aL\0\0\x4\x16)

[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()

Note that I'm using the stock darker.conf while OP is using a customized dark.conf in his home directory.

Last edited by kermit63 (2024-12-07 22:33:36)


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Online

#9 2024-12-07 22:19:28

chelmi00
Member
Registered: 2024-05-16
Posts: 9

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

I am, and they work. They are in the stylesheet tab. You can easily see the dolphin.qss use in the pic and video, all the green grey (left and upper) zone is due to it.
Sorry for not telling earlier

Last edited by chelmi00 (2024-12-08 08:51:00)

Offline

#10 2024-12-07 22:38:29

seth
Member
Registered: 2012-09-03
Posts: 60,776

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

And what if you skip those, as they will enforce the use of the QStyleSheetStyle as proxy.

Offline

#11 2024-12-07 22:43:04

kermit63
Member
Registered: 2018-07-04
Posts: 287

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

Just out of curiosity, I installed Dolphin to check and encountered the same problem as OP. No mods, just default configuration.

It spits out the following error message when run from the terminal:

org.kde.dolphin: Unknown class  ""  in session saved data!
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.

Last edited by kermit63 (2024-12-07 22:52:42)


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Online

#12 2024-12-07 23:28:57

seth
Member
Registered: 2012-09-03
Posts: 60,776

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

Offline

#13 2024-12-08 08:49:33

chelmi00
Member
Registered: 2024-05-16
Posts: 9

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

I already tried removing the stylesheets. I feel they are independent from the darkmode, because they work. However, when using qt5ct, instead of qt6ct they didn't work. For extra information, with qt6ct, systemsettings appear in dark mode, following my color theme, but with qt5ct it didn't.

In my case, the following appears when running dolphin from the terminal:

$ dolphin
kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeLight.colors"
qt.dbus.integration: QDBusConnection: name 'org.freedesktop.UDisks2' had owner '' but we thought it was ':1.57'

For extra information, when adding the main stylesheet I use, the background is dark, but also is the text, as seen here:

$ dolphin --stylesheet ~/.config/qt6ct/qss/dolphin_head.qss
Could not parse application stylesheet
kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeLight.colors"

Yeah, seth, it is a recurring problem. Some kde apps, such as kate or konsole (which I use) have the option to change the theme and color scheme. However, dolphin does not, and it sucks...

Btw, I edited a bit my last post

Last edited by chelmi00 (2024-12-08 09:13:11)

Offline

#14 2024-12-08 09:07:07

chelmi00
Member
Registered: 2024-05-16
Posts: 9

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

I have the following in the ~/.config/dolphinrc file:

MenuBar=Disabled

[$Version]
update_info=dolphin_detailsmodesettings.upd:rename-leading-padding,dolphin_detailsmodesettings.upd:move-content-display

[ExtractDialog]
1600x900 screen: Height=600
1600x900 screen: Width=1066
DirHistory[$e]=$HOME/Downloads/tdsñ/,$HOME/Downloads/Fonts/,$HOME/Downloads/mathworks/
eDP-1 Height 1440x810=540
eDP-1 Height 1600x900=562
eDP-1 Width 1440x810=960
eDP-1 Width 1600x900=1066

[General]
ConfirmClosingMultipleTabs=false
RememberOpenedTabs=false
ShowFullPath=true
UseTabForSwitchingSplitView=true
Version=202
ViewPropsTimestamp=2022,10,4,13,31,12.52

[IconsMode]
IconSize=32
MaximumTextLines=3

[KFileDialog Settings]
Places Icons Auto-resize=false
Places Icons Static Size=22
Recent Files[$e]=file:$HOME,file:$HOME
Recent URLs[$e]=file:$HOME/Downloads/,file:$HOME/,file:$HOME/Downloads/tdsñ/
detailViewIconSize=16

[KPropertiesDialog]
1600x900 screen: Height=670
1600x900 screen: Width=640
eDP-1 Height 1440x810=616
eDP-1 Height 1600x900=452
eDP-1 Width 1440x810=438
eDP-1 Width 1600x900=570

[MainWindow]
MenuBar=Disabled
ToolBarsMovable=Disabled
XWAYLAND0 Window-Maximized 1368x768=true
XWAYLAND0 XPosition 1368x768=0
XWAYLAND0 YPosition 1368x768=64
eDP-1 Height 1440x810=755
eDP-1 Height 1600x900=845
eDP-1 Width 1440x810=1436
eDP-1 Width 1600x900=1596
eDP-1 XPosition 1440x810=0
eDP-1 XPosition 1600x900=2
eDP-1 YPosition 1440x810=49
eDP-1 YPosition 1600x900=26

[Open-with settings]
CompletionMode=1
History=kate,fire,fir,kat

[PreviewSettings]
Plugins=appimagethumbnail,audiothumbnail,blenderthumbnail,comicbookthumbnail,djvuthumbnail,ebookthumbnail,exrthumbnail,directorythumbnail,fontthumbnail,imagethumbnail,jpegthumbnail,windowsexethumbnail,windowsimagethumbnail,opendocumentthumbnail,gsthumbnail,rawthumbnail,svgthumbnail,ffmpegthumbs

[ViewPropertiesDialog]
1920x1080 screen: Height=344
1920x1080 screen: Width=462

Offline

#15 2024-12-08 09:23:49

chelmi00
Member
Registered: 2024-05-16
Posts: 9

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

Guys, I discovered the solution, I want to scream. I was going through the katerc file, as I said in

chelmi00 wrote:

I already tried removing the stylesheets. I feel they are independent from the darkmode, because they work. However, when using qt5ct, instead of qt6ct they didn't work. For extra information, with qt6ct, systemsettings appear in dark mode, following my color theme, but with qt5ct it didn't.

In my case, the following appears when running dolphin from the terminal:

$ dolphin
kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeLight.colors"
qt.dbus.integration: QDBusConnection: name 'org.freedesktop.UDisks2' had owner '' but we thought it was ':1.57'

For extra information, when adding the main stylesheet I use, the background is dark, but also is the text, as seen here:

$ dolphin --stylesheet ~/.config/qt6ct/qss/dolphin_head.qss
Could not parse application stylesheet
kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeLight.colors"

Yeah, seth, it is a recurring problem. Some kde apps, such as kate or konsole (which I use) have the option to change the theme and color scheme. However, dolphin does not, and it sucks...

Btw, I edited a bit my last post

kate theme color can be changed in the app. Therefore, going through it, I found the following lines

[UiSettings]
ColorScheme=Breeze Dark

I added it to ~/.config/dolphinrc and it was solved.
I have my concerns about how much it will last until it autochanges (this files get triggered by every move you make in the apps and in systemsettings, at least), but it finally looks good as soon as you start it.
Thank you so much.

Offline

#16 2024-12-08 14:23:58

seth
Member
Registered: 2012-09-03
Posts: 60,776

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

Guys, I discovered the solution, I want to scream. I was going through the katerc file, as I said in

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

For completeness sake:

I already tried removing the stylesheets. I feel they are independent from the darkmode, because they work.

The concern wasn't that the stylesheet fails, but it invokes a proxy style (you're not running Breeze - directly - anymore and I worried that proxy style might spoil this.
https://www.kdab.com/say-no-to-qt-style-sheets/

However

Therefore, going through it, I found the following lines

[UiSettings]
ColorScheme=Breeze Dark

I added it to ~/.config/dolphinrc and it was solved.

Yu, that fits the linked https://github.com/KDE/dolphin/blob/18c … w.cpp#L934 - dolphin actually reads the value from a KDE setting and steamdrolls that over the Qt palette, previously set by the platform theme (qt6ct)

Offline

#17 2024-12-09 00:03:31

chelmi00
Member
Registered: 2024-05-16
Posts: 9

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

The stylesheets whether they are checked or not, do nothing with this issue, as seen here

Offline

#18 2024-12-09 07:13:33

seth
Member
Registered: 2012-09-03
Posts: 60,776

Re: [SOLVED] Qt6ct not acting as expected on gtk app in i3wm

You're missing the point wink
I *suspected* not them but the required proxy style plugin to get in the way of color changes (but w/ kermit63's comment #8 that theory was out anyway)

Offline

Board footer

Powered by FluxBB