You are not logged in.

#1 2018-06-26 11:32:57

Vsevolod-linuxoid
Member
Registered: 2018-06-26
Posts: 3

[SOLVED]QT_QPA_PLATFORMTHEME=gtk2 doesn't work properly, and qt5ct too

I was a fool. I did all right. Qt5 apps used GTK2 theme. Just "TraditionalOK" in GTK2 version was bad. After change GTK theme to another all went back to normal: https://imgur.com/mRvBJK2 Thank you, arojas, you was right.

I installed Arch Linux on my laptop with Mate as DE.

I want to make uniform look for Qt and GTK applications on my system, so I installed qt5-styleplugins package and all qt5 group.

Then I added

QT_QPA_PLATFORMTHEME=gtk2

to /etc/environment , then logged out and logged in DE, but after this all Qt5 apps looked not very good: https://image.ibb.co/c92Czo/2018_06_26_14_17_32.png, not like as GTK apps: https://image.ibb.co/mdi5kT/2018_06_26_14_42_11.png

So I installed qt5ct and changed

QT_QPA_PLATFORMTHEME=gtk2

to

QT_QPA_PLATFORMTHEME=qt5ct

in /etc/environment , then logged out and logged in DE,  then set style to gtk2 in qt5ct. It was same bad effect as with

QT_QPA_PLATFORMTHEME=gtk2

.

Reboot also didn`t change anything. How to make uniform look for Qt and GTK applications?

Sorry, if I did mistakes in the text, English is not my native language.

Mod Edit - Replaced oversized images with links.
CoC - Pasting pictures and code

Last edited by Vsevolod-linuxoid (2018-06-27 10:44:29)

Offline

#2 2018-06-26 13:09:33

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,202

Re: [SOLVED]QT_QPA_PLATFORMTHEME=gtk2 doesn't work properly, and qt5ct too

The platform theme uses GTK2, not GTK3. Have you set your GTK2 theme correctly?

Offline

#3 2018-06-26 13:15:37

Vsevolod-linuxoid
Member
Registered: 2018-06-26
Posts: 3

Re: [SOLVED]QT_QPA_PLATFORMTHEME=gtk2 doesn't work properly, and qt5ct too

arojas, what application still uses GTK2? I want to check your guess.

Last edited by Vsevolod-linuxoid (2018-06-26 13:17:02)

Offline

#4 2018-06-26 13:16:25

lupov
Member
Registered: 2018-06-26
Posts: 1

Re: [SOLVED]QT_QPA_PLATFORMTHEME=gtk2 doesn't work properly, and qt5ct too

Hi,

This works for me

https://wiki.archlinux.org/index.php/Un … plications

pacman -S qt5ct qt5-styleplugins
echo "export QT_QPA_PLATFORMTHEME=gtk2" >> /etc/profile.d/qt5ct.sh
echo "export QT_AUTO_SCREEN_SCALE_FACTOR=0" >> /etc/profile.d/qt5ct.sh
reboot

Offline

#5 2018-06-26 13:23:58

Vsevolod-linuxoid
Member
Registered: 2018-06-26
Posts: 3

Re: [SOLVED]QT_QPA_PLATFORMTHEME=gtk2 doesn't work properly, and qt5ct too

QT_AUTO_SCREEN_SCALE_FACTOR=0 didn`t help too

Last edited by Vsevolod-linuxoid (2018-06-26 13:28:06)

Offline

#6 2018-06-26 13:28:34

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: [SOLVED]QT_QPA_PLATFORMTHEME=gtk2 doesn't work properly, and qt5ct too

If you prefer the gtk3 integration, then use QT_QPA_PLATFORMTHEME=gtk3 and maybe the adwaita-qt5 style.

Edit: How does your gtk2 theme look? Compare the gui of gtk-demo -> "Application main window" with your qt applications.
Edit: Clarification for gtk3, thanks to arojas.

Last edited by progandy (2018-06-26 13:50:41)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2018-06-26 13:41:44

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,202

Re: [SOLVED]QT_QPA_PLATFORMTHEME=gtk2 doesn't work properly, and qt5ct too

Note that "platform theme" != "style plugin". There is a gtk3 platform theme that will make Qt apps use the gtk3 settings for icons, fonts, file chooser etc. but there is *no* gtk3 style plugin that will use the gtk3 theme for Qt applications. If you want all applications to look the same, use a theme that provides gtk and Qt versions.

Offline

Board footer

Powered by FluxBB