QWidgetAction.requestWidget doesn't keep the Python object
Phil Thompson
phil at riverbankcomputing.com
Sun Nov 19 11:34:30 GMT 2023
On 19/11/2023 04:09, Maurizio Berti wrote:
> 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?
It will be in the next releases.
Phil
More information about the PyQt
mailing list