[PyQt] causes self to be owned by Qt instead of PyQt ???

Andreas Pakulat apaku at gmx.de
Thu Apr 2 17:18:29 BST 2015


Hi,

On Thu, Apr 2, 2015 at 3:18 PM, redstone-cold <redstone-cold at 163.com> wrote:

>
>
> Ok, this is the example
> https://bpaste.net/show/a5b2b50e5052
>
> BTW,if you comment print(model.parent()),then console show
> QObject::startTimer: QTimer can only be used with threads started with
> QThread
>
> what's wrong in the code ?
>

QAbstractItemModel.parent() require an argument, so calling it without an
argument is a bug.

And the message is printed regardless of wether the print is there or not,
thats likely an internal issue in Qt.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150402/083f2c7d/attachment.html>


More information about the PyQt mailing list