You are not logged in.

#1 2015-04-24 14:56:38

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

[solved dirty] Force QT4-GUI-style for specific (non-QT) application?

Hello,
I recently moved to KF5 and discovered, that some applications look better with (qtconfig-qt4: GUI-style=GTK+) and some better with (qtconfig-qt4: GUI-style=breeze).
It's clear how to force a theme for a QT-application (with the --style argument, permanent in the matching .desktop file), but how is it possible to force another QT4 GUI-style for a non-QT application? (e.g. owncloud-client.)
I really searched and tried a lot (e.g. environmental variables...) but haven't found a solution yet.
Thanks.

Last edited by Carl Karl (2015-04-24 17:56:18)

Offline

#2 2015-04-24 16:58:11

Carl Karl
Member
Registered: 2013-06-12
Posts: 231

Re: [solved dirty] Force QT4-GUI-style for specific (non-QT) application?

I found a very dirty solution.

For example owncloud-client:
The binary is /usr/bin/owncloud. So I created (regarding https://wiki.archlinux.org/index.php/Un … #QGtkStyle )

/usr/local/bin/owncloud
------------------------------------------
#! /bin/bash
echo "[QT]" >> ~/.config/Trolltech.conf 
echo "style=GTK+" >> ~/.config/Trolltech.conf 
/usr/bin/owncloud &
sleep 10s
echo "[QT]" >> ~/.config/Trolltech.conf 
echo "style=Breeze" >> ~/.config/Trolltech.conf 
exit 0

and of course made it executable.

I don't know where, but I've read that in ~/.config/Trolltech.conf only the last setting is regarded valid (Edit: here), so it's no problem appending those style switches.

If you got a better solution: You're welcome to post it here! :-)

Last edited by Carl Karl (2015-04-27 16:17:42)

Offline

Board footer

Powered by FluxBB