QWidgetAction.requestWidget doesn't keep the Python object

Maurizio Berti maurizio.berti at gmail.com
Sun Nov 19 04:09:39 GMT 2023


Il giorno sab 18 nov 2023 alle ore 09:19 Phil Thompson <
phil at riverbankcomputing.com> ha scritto:

> Are you able to build PyQt yourself? If so please try the attached.
>

I cannot rebuild PyQt6 right now, but I managed to do it on PyQt5, and it
works!
Other than the given example, it also fixes an issue I had with legacy Qt
versions on my original code: I'm actually using a QSlider as a custom
widget for the action, but using setValue() on created widgets in order to
keep them consistent resulted in an invalid QVariant warning in the stdout,
so I chose to use setProperty('value', value) instead. The problem didn't
show on newer PyQt versions though.

Based on my understanding, the above aspects and my previous research, I
suppose that the problem should be solved for PyQt6 too.

Thank you so much!
Will you eventually add this fix for both 5 and 6?

Cheers,
MaurizioB

-- 
È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
http://www.jidesk.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20231119/4de75a4c/attachment.htm>


More information about the PyQt mailing list