Re: QLabel with scaled contents pixmap not updated after painting
Maurizio Berti <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <CAPn+-XSNS8Q==dxH+OzfD-0AdyxKV__VzhCAzsf6PyEQpc80ig@mail.gmail.com> |
Il giorno mar 26 nov 2019 alle ore 14:00 Florian Bruhin <[email protected]> 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 _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt