[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] QStyleOptionButton.text cannot be updated once accessed
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2016-09-29 14:46:11
Message-ID: 5C6AF9A0-3DA7-4E88-9750-32C95495E334 () riverbankcomputing ! com
[Download RAW message or body]
On 29 Sep 2016, at 10:39 am, Ales Erjavec <ales.erjavec324@gmail.com> wrote:
>
> QStyleOptionButton.text attribute cannot be updated it it was
> previously assigned to or just accessed
>
> The following fails with an assertion error:
>
> ======
>
> from PyQt5.QtWidgets import QStyleOptionButton
> opt = QStyleOptionButton()
> opt.text = "Hello"
> assert opt.text == "Hello" # This works,
>
> opt.text = "world!"
> assert opt.text == "world!" # This fails, opt.text is still "Hello"
>
>
> opt = QStyleOptionButton()
> print(opt.text) # access
> opt.text = "Hello"
> assert opt.text == "Hello" # This fails, opt.text is still ''
>
> ======
>
> Python: 3.5
> PyQt: 5.7 (installed from the official wheel)
> OS: OS X 10.11.6 El Capitan
Should be fixed with tonight's SIP snapshot.
Thanks,
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic