You are not logged in.

#1 2017-10-29 13:42:44

dud
Member
From: Wroclaw, Poland
Registered: 2015-10-03
Posts: 18

[SOLVED] I can't set plasma style for own application

OS: Arch Linux
Kernel: 4.13.8-1

Hi.
I cannot set the Breeze style for my application written in PyQt5.

I have appended a line "export QT_QPA_PLATFORMTHEME=qt5ct" to my .zshrc file, rebooted and set Breeze style with qt5ct:
4akPdnym.jpg

All applications installed with pacman have Breeze theme, but when I run my PyQt5 application it has the default theme (fusion?):
H8AaWGCm.png

Do you have any idea how I can fix it? GUI was made with Qt Designer. As you can see, I've got there a Breeze style (look at these RadioButtons):
2RT56Ddm.jpg

I've tried to run an application like ./untitle.py -style <something> but it didn't work too.

Last edited by dud (2017-10-29 15:28:06)

Offline

#2 2017-10-29 13:46:06

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

Re: [SOLVED] I can't set plasma style for own application

Is the GUI of your application done with QWidgets or QtQuick?

Offline

#3 2017-10-29 13:48:32

dud
Member
From: Wroclaw, Poland
Registered: 2015-10-03
Posts: 18

Re: [SOLVED] I can't set plasma style for own application

arojas wrote:

Is the GUI of your application done with QWidgets or QtQuick?

QtWidgets.

Offline

#4 2017-10-29 14:16:36

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

Re: [SOLVED] I can't set plasma style for own application

What if you "export QT_STYLE_OVERRIDE=Breeze" for at least that application?

Offline

#5 2017-10-29 14:27:47

dud
Member
From: Wroclaw, Poland
Registered: 2015-10-03
Posts: 18

Re: [SOLVED] I can't set plasma style for own application

seth wrote:

What if you "export QT_STYLE_OVERRIDE=Breeze" for at least that application?

It hasn't helped.

Offline

#6 2017-10-29 14:32:59

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

Re: [SOLVED] I can't set plasma style for own application

Did you install pyqt with pacman or with pip?

Offline

#7 2017-10-29 14:34:43

dud
Member
From: Wroclaw, Poland
Registered: 2015-10-03
Posts: 18

Re: [SOLVED] I can't set plasma style for own application

With pacman (python-pyqt5 package)

Offline

#8 2017-10-29 14:36:38

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

Re: [SOLVED] I can't set plasma style for own application

Offline

#9 2017-10-29 14:52:32

dud
Member
From: Wroclaw, Poland
Registered: 2015-10-03
Posts: 18

Re: [SOLVED] I can't set plasma style for own application

Tabs look exactly the same in ReText and in my application (when in Qt Designer and other apps like QTerminal tabs have 'x' in the circle).
JLIJh1qm.jpg

Offline

#10 2017-10-29 15:19:47

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

Re: [SOLVED] I can't set plasma style for own application

dud wrote:

With pacman (python-pyqt5 package)

Are you 100% sure you don't have any other pyqt installation on your system? what's the output of

python -c 'import PyQt5; print(PyQt5.__file__)'

?

Offline

#11 2017-10-29 15:26:30

dud
Member
From: Wroclaw, Poland
Registered: 2015-10-03
Posts: 18

Re: [SOLVED] I can't set plasma style for own application

I listed all packages installed with pip and I had PyQt5... I removed this and now it works like a charm.

Well, I don't remember when I've installed this hmm

Thanks a lot guys!

Offline

Board footer

Powered by FluxBB