[PyQt] SIGABRT when setting QQmlListProperty

Cody Scott cody at perspexis.com
Tue Dec 18 20:42:52 GMT 2018


This was a Qt bug and has been fixed.
https://bugreports.qt.io/browse/QTBUG-60427

And instead of a SIGABRT there is a nice error message!

Traceback (most recent call last):
  File "bug.py", line 15, in names
    return QtQml.QQmlListProperty(str, self, self._names)
TypeError: type argument must be a sub-type of QObject



On Fri, 13 Jan 2017 at 22:26, Cody Scott <cody at perspexis.com> wrote:

> That's true but it seems like something that should not be happening.
>
> On Fri, Jan 13, 2017 at 5:24 PM, Phil Thompson <
> phil at riverbankcomputing.com> wrote:
>
>> On 13 Jan 2017, at 6:06 pm, Cody Scott <cody at perspexis.com> wrote:
>> >
>> > I'm using @pyqtProperty(QtCore.QVariant) for the list property and it
>> works as long as I do .toVariant() in the setter.
>> >
>> > One thing is that it calls the setter twice for each instance in this
>> example. I believe it should only call each setter once.
>> >
>> > https://gist.github.com/Siecje/d1f2b270305762b4f73540c72adee6b8
>>
>> If you comment in the test to see if the value has really changed then it
>> seems to do as you expect.
>>
>> Phil
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20181218/c07153ee/attachment.html>


More information about the PyQt mailing list