You are not logged in.

#1 2022-12-15 12:01:27

TheBigBadBot
Member
Registered: 2022-12-15
Posts: 8

[SOLVED] Unable to use QT5 style plugins after update

I installed ArchLinux quite recently.

I wanted to used my GTK style in QT applications too (to have the same theme for everything). I was able to do it by installing `qt5-styleplugins` in the AUR, and select "gtk2" with `qt5ct`.
I added the environment variable `QT_QPA_PLATFORMTHEME=qt5ct", and I had no issue at all.

After an update (of both `qt5-base` and `qt5-styleplugins` - idk if `qt5ct` was updated too), qt5ct could not found any of the themes provided by `qt5-styleplugins`... So all my QT apps use the default QT style right now.

I tried downgrading `qt5-styleplugins`, without effect. Also tried to use an old library file `libqgtk2style.so`, but even if this time the style is detected by qt5ct, it crashes because "Cannot mix incompatible Qt library (5.15.2) with this library (5.15.7)" (I prefer avoid downgrading `qt5-base`, perhaps some things will break).
(I still can use other QT styles, like kvantum)


My goal is to have the same theme for both QT and GTK apps, I don't really mind how to do it. Any help is welcome ^^

Last edited by TheBigBadBot (2022-12-15 15:44:11)

Offline

#2 2022-12-15 12:38:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,300

Re: [SOLVED] Unable to use QT5 style plugins after update

You need to rebuild qt5-styleplugins after every qt5-base bump. Did you do that?

Offline

#3 2022-12-15 12:40:31

TheBigBadBot
Member
Registered: 2022-12-15
Posts: 8

Re: [SOLVED] Unable to use QT5 style plugins after update

Yes, I ran `yay -S --rebuild qt5-styleplugins` and cleanBuild it. The styles provided by that package are still not visible from qt5ct.

Offline

#4 2022-12-15 14:18:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,207

Re: [SOLVED] Unable to use QT5 style plugins after update

Cannot mix incompatible Qt library (5.15.2) with this library (5.15.7)

ls /usr/lib/libQt5*so.5.*
ls /usr/lib/*5.15.2*
pacman -Qikk qt5ct
type -a qt5ct
ldd /usr/bin/qt5ct # assuming that's the type result
ldd /usr/lib/qt/plugins/platformthemes/libqt5ct.so
ldd /usr/lib/qt/plugins/styles/libqt5ct-style.so

Offline

#5 2022-12-15 15:43:31

TheBigBadBot
Member
Registered: 2022-12-15
Posts: 8

Re: [SOLVED] Unable to use QT5 style plugins after update

Great news, I found the problem!

So sorry to have bothered you both.

So it appears that I was doing something wrong with my `/etc/makepkg.conf` (I edited it, yes) :

export CC=clang
export CXX=clang++
CFLAGS="-O3 -flto -march=native -pipe"
CXXFLAGS="$CFLAGS"
LDFLAGS="-fuse-ld=lld"
[...]

I wanted to use clang to compile C code when using `makepkg`, but unfortunately GCC is always used (at least when building qt5-styleplugins) - nothing change when I remove the `export` from the conf.
Therefore, the LDFLAGS var is not valid anymore (it was intended to be used with clang). Removing LDFLAGS from the conf file worked like a charm: qt5ct can see the installed QT styles.

I'll mark this as resolved.

Offline

Board footer

Powered by FluxBB