[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] SIGABRT when setting QQmlListProperty
From: Cody Scott <cody () perspexis ! com>
Date: 2018-12-18 20:42:52
Message-ID: CAN04N8YQg5k-gnupcYiNqf09rviyJp2P1iF+k7+wKQz9u9hnZQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@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@riverbankcomputing.com> wrote:
>
>> On 13 Jan 2017, at 6:06 pm, Cody Scott <cody@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
>
>
>
[Attachment #5 (text/html)]
<div dir="ltr"><div dir="ltr"><div dir="ltr">This was a Qt bug and has been fixed. <a \
href="https://bugreports.qt.io/browse/QTBUG-60427" \
target="_blank">https://bugreports.qt.io/browse/QTBUG-60427</a></div><div \
dir="ltr"><br></div><div>And instead of a <span \
style="color:rgb(51,51,51);font-family:consolas,"liberation \
mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">SIGABRT</span>
there is a nice error message!</div><div><br></div><div>Traceback (most recent call \
last):<br> File "bug.py", line 15, in names<br> return \
QtQml.QQmlListProperty(str, self, self._names)<br>TypeError: type argument must be a \
sub-type of QObject</div><div><br></div><div><br></div></div></div><br><div \
class="gmail_quote"><div dir="ltr">On Fri, 13 Jan 2017 at 22:26, Cody Scott <<a \
href="mailto:cody@perspexis.com" target="_blank">cody@perspexis.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr">That's true but it seems like something that should not be \
happening.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 13, \
2017 at 5:24 PM, Phil Thompson <span dir="ltr"><<a \
href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><span>On 13 Jan 2017, at 6:06 pm, Cody Scott \
<<a href="mailto:cody@perspexis.com" target="_blank">cody@perspexis.com</a>> \
wrote:<br> ><br>
> I'm using @pyqtProperty(QtCore.QVariant) for the list property and it works \
as long as I do .toVariant() in the setter.<br> ><br>
> One thing is that it calls the setter twice for each instance in this example. I \
believe it should only call each setter once.<br> ><br>
> <a href="https://gist.github.com/Siecje/d1f2b270305762b4f73540c72adee6b8" \
rel="noreferrer" target="_blank">https://gist.github.com/Siecje/d1f2b270305762b4f73540c72adee6b8</a><br>
<br>
</span>If you comment in the test to see if the value has really changed then it \
seems to do as you expect.<br> <span \
class="gmail-m_5328384446972719154gmail-m_-5965302282696546100gmail-m_-5150315242506375142HOEnZb"><font \
color="#888888"><br> Phil</font></span></blockquote></div><br></div>
</blockquote></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