[PyQt] Unable to call methods returning void from Qml Plugins
pwuertz
pwuertz at gmail.com
Sat Sep 13 14:51:15 BST 2014
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
Traceback (most recent call last)
-- cut --
TypeError: unable to convert a QVariant of type 0 to a QMetaType of type 43
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.
--
View this message in context: http://python.6.x6.nabble.com/Unable-to-call-methods-returning-void-from-Qml-Plugins-tp5071515.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list