Launch a QT app with custom theme

Hi,

I installed the “Synology Drive Client” (AUR) and noticed that it has problem with the Breeze Dark theme in Plasma. The configuration UI is mostly black until you hover over a setting with the mouse… Switching to the light/default Breeze theme fixed the problems.

“Synology Drive Client” is a QT app and I’m wondering if there is some easy way to force it to launch with a light color scheme? One recommendation I saw was to use Kvantum, but maybe there is some easy config I can tweak instead?

1 Like

Right click one the titlebar of the window. Maybe you can find a solution in this context menu. It offers a lot of options to change settings for the window and the programm.
That’s just a guess. Didn’t try it.

Good question…

I know with GTK you can do something like that:

Exec=env GTK_THEME=deepin-dark gedit %U

Not sure about qt :thinking:

Try something like (in .desktop file):

Exec=env QT_STYLE_OVERRIDE=Oxygen qbittorrent %U

© https://wiki.archlinux.org/index.php/Uniform_look_for_Qt_and_GTK_applications#Adwaita

To me on KDE Plasma it works for everything except the window decoration

The settings in the first screenshot only apply to the specific window. The settings in the second screenshot apply to the specific program.
You can only see part of the settings. A lot more can be changed.

1 Like

@Trekkie00 thanks for the suggestion, tried to change some window-related settings but I got no change in the UI…

Then I tried the following, “Breeze” is not recognized (?)

[ake@linux ~]$ export QT_STYLE_OVERRIDE=Breeze
[ake@linux ~]$ synology-drive 
[ake@linux ~]$ lib path = '/opt/Synology/SynologyDrive/lib/plugins'
QApplication: invalid style override passed, ignoring it.
    Available styles: Windows, Fusion

Then I tried with both “Windows” and “Fusion”, gives no error but no change in the UI either.

Here is a screenshot of the problem:

Do you use kvantum?:

E.g.:

yeah kvantum is nice, even gtk/qt with ant-dracula is nice

Did a test with Kvantum, changing the theme for e.g. Kate to “KvArc” (light theme) works, but unfortunately I see no change for Synology Drive. It it possible to do a manual override somewhere in the configuration files for the app to force it to read the default Breeze theme data?

Edit: When I did the test with KvArc and Kate, the editor i Kate remained dark, so I can of course have missed some step in Kvantum Manager.

and how is the gtk theme set in kde ? breeze?

Yes, “Breeze” in Application Style / GNOME/GTK Application Style. Will this setting affect QT apps as well?

i dont know i see in synologie drive , nautilus it confuse me

This isn’t really recommended and I haven’t used kde in a while but I remember applications that had root access (gparted-time shift) ignored theming in kde unless I set the theme I wanted as root.

1 Like