[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] QLabel with scaled contents pixmap not updated after painting
From: Maurizio Berti <maurizio.berti () gmail ! com>
Date: 2019-11-26 13:51:45
Message-ID: CAPn+-XSNS8Q==dxH+OzfD-0AdyxKV__VzhCAzsf6PyEQpc80ig () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Il giorno mar 26 nov 2019 alle ore 14:00 Florian Bruhin <me@the-compiler.org>
ha scritto:
> I can reproduce with Qt 5.14, but I don't think it necessarily is a Qt
bug.
>
> Looking at the code, turning on scaledContents resizes the underlying
pixmap
> once and then caches it:
>
>
https://github.com/qt/qtbase/blob/v5.14.0-beta3/src/widgets/widgets/qlabel.cpp#L1092-L1104
Oh, I see.
> What's your actual usecase? You could probably either modify/redisplay the
> pixmap, or perhaps have a widget with a transparent background over the
QLabel
> instead.
I don't really need it right now, I just stumbled upon it from this
question:
https://stackoverflow.com/q/59047167/2001654
I can understand the behavior (and the necessity for caching), and the fact
that
technically it's not a bug, but still looks a bit consistent and might be
useful
to notify the team (possibly by adding a note in the docs).
Thank you,
Maurizio
--
È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
http://www.jidesk.net
[Attachment #5 (text/html)]
<div dir="ltr"><div dir="ltr"><div dir="ltr">Il giorno mar 26 nov 2019 alle ore 14:00 \
Florian Bruhin <<a href="mailto:me@the-compiler.org">me@the-compiler.org</a>> \
ha scritto:<br>> I can reproduce with Qt 5.14, but I don't think it \
necessarily is a Qt bug.<br>><br>> Looking at the code, turning on \
scaledContents resizes the underlying pixmap<br>> once and then caches \
it:<br>><br>> <a \
href="https://github.com/qt/qtbase/blob/v5.14.0-beta3/src/widgets/widgets/qlabel.cpp#L \
1092-L1104">https://github.com/qt/qtbase/blob/v5.14.0-beta3/src/widgets/widgets/qlabel.cpp#L1092-L1104</a></div><div><br></div><div>Oh, \
I see.</div><div dir="ltr"><br>> What's your actual usecase? You could \
probably either modify/redisplay the<br>> pixmap, or perhaps have a widget with a \
transparent background over the QLabel<br>> instead.</div><div \
dir="ltr"><br></div><div>I don't really need it right now, I just stumbled upon \
it from this question:</div><div><a \
href="https://stackoverflow.com/q/59047167/2001654">https://stackoverflow.com/q/59047167/2001654</a></div><div \
dir="ltr"><br></div><div>I can understand the behavior (and the necessity for \
caching), and the fact that</div><div>technically it's not a bug, but still looks \
a bit consistent and might be useful</div><div>to notify the team (possibly by adding \
a note in the docs).</div><div></div><div dir="ltr"><br></div><div>Thank \
you,</div><div>Maurizio <br></div>-- <br><div dir="ltr" class="gmail_signature">È \
difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - \
"Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" \
target="_blank">http://www.jidesk.net</a></div></div></div>
[Attachment #6 (text/plain)]
_______________________________________________
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