PDA

View Full Version : Using QML Components for the Desktop with PySide



hansotronic
16th March 2012, 14:32
Hey guys,

I'm developing an App using the Components for the Desktop and PySide and I have a problem with the import of the Components. Up till now i was only using the QT Creator for building my QML-Gui. Now I tried to use the gui in a pyside application and now i get this error when i try to start the application:

file:///Users/Hannes/Coding/PxSt/UserClient/Components/JobList_View.qml:189:5: Type ScrollAreaHelper unavailable
ScrollAreaHelper {
^

seems like pyside doesn't find the installed Desktop components. Using the QML-Viewer everything works fine. do i have to set an import path so that pyside finds the components?

regards

hansotronic
24th March 2012, 09:07
just to let you guys know. if you start the QML through PySide the Plugins are handled by PySide too. So you have to expose new plugins to QML using QtDeclarative.qmlRegisterType. For that to work you have to write a wrapper for your cpp-Plugings or rewrite them in PySide.

regards

tiredtyrant
30th October 2012, 00:49
Hello, I'd like to know if you managed to use Qt Desktop Components with Pyside. I'm trying to use it too, but I don't know much about how I can bring those C++ classes (QStylePlugin, QStyleItem, etc...) to Python. Could you please elaborate?