On/Off-Switch with QPushButton
Rainer Dorsch
ml at bokomoko.de
Sun Nov 1 11:19:32 UTC 2015
Hi Luca,
On Sunday 01 November 2015 12:05:21 Luca Beltrame wrote:
> In data domenica 1 novembre 2015 11:57:54 CET, Rainer Dorsch ha scritto:
>
> Hello Rainer,
>
> > http://doc.qt.io/qt-5/qabstractbutton.html#iconSize-prop
>
> The reason for the exception lies in the Qt version you are referencing: Qt
> 5. Plasma 4.11.x and the Python bindings you are using are based on Qt 4,
> so this property is likely non existent there.
>
> > What would work better?
>
> IIRC (it's been such a long time since I wrote something with the Python
> bindings), Plasma.Button. This will follow the font, color, and other bits
> set in the Plasma theme.
actually, I was wrong, I do use Plasma.PushButton()
self.button.append(Plasma.PushButton())
I just used the QPushButton documentation, because I did not find a whole lot
about how Plasma.PushButton works :-/
Rainer
--
Rainer Dorsch
http://bokomoko.de/
More information about the Plasma-devel
mailing list