[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Unable to call methods returning void from Qml Plugins
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2014-09-13 15:18:35
Message-ID: db02457be984409d80f9e8a41c503c7d () riverbankcomputing ! com
[Download RAW message or body]
On 13/09/2014 2:51 pm, pwuertz wrote:
> Hi,
> I developed a QML plugin with Qt Creator which I'd like to use in a
> PyQt5
> application. It is loaded in a qml scene and I can access my custom
> QQuickItems from python just fine (properties, signals..). However,
> calling
> a Slot that returns a void results in the following TypeError:
>
> Trying to create a QVariant instance of QMetaType::Void type, an
> invalid
> QVariant will be constructed instead
Sounds like a hack.
> Traceback (most recent call last)
> -- cut --
> TypeError: unable to convert a QVariant of type 0 to a QMetaType of
> type 43
I can handle that as a specific special case.
> When I rewrite the method of my custom QQuickItem so it returns a bool
> instead of void, calling the slot from python works perfectly fine.
> Also
> calling the void method from Qml works as expected.
> The PyQt version on my system is 5.3.1.
Try tonight's snapshot.
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://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