[PyQt] QtQuick documentation for PyQt5?

Phil Thompson phil at riverbankcomputing.com
Mon Jan 27 16:54:57 GMT 2014


On 27-01-2014 4:19 pm, Russell Warren wrote:
> Where is the documentation for getting QtQuick/QML working in PyQt5?
>  Im new to PyQt and am trying to take QML for a spin and it is a
> tough slog.
>
> The PyQt4 docs had what looked to be a decent starting point, going 
> as
> far as showing the connection of signals defined in QML through to
> python code (awesome):
> http://pyqt.sourceforge.net/Docs/PyQt4/qml.html [1]
>
> That looked great, except the QDeclarativeView is no more in PyQt5.
>  I see that PyQt4.QtDeclarative is also gone, and that things have
> more-or-less moved to PyQt5.QtQml and PyQt5.QtQuick.
>
> Moving up to the new PyQt5 docs, they dont really show how to do an
> application, but only seem to highlight the apparently new ability to
> register python types with QML:
>
> http://pyqt.sourceforge.net/Docs/PyQt5/qml.html [2]
>
> Searching the mailing list and web, Ive found a convenient (only
> vaguely related) thread [1] that has both PyQt4 and PyQt5 code for 
> the
> same thing, which reveals that the proper container to use now seems
> to be QtQuick.QQuickView.  This si now my starting point.
>
> Ive searched the PyQt5 docs for QQuickView references to try and find
> proper docs on how to use this (like existed for PyQt4), but nothing
> useful comes up.
>
> After all that, Ill keep plugging away at this and try and port the
> PyQt4 documentation example to PyQt5, but I cant shake the feeling Im
> not looking in the right place for PyQt5 docs.
>
> Where are the docs for using QtQuick in PyQt5?

The PyQt5 QML docs are intended to supplement the standard Qt docs, not 
replace them. They assume that you are familiar with the concepts and 
just show you how they are applied in a Python context.

Phil


More information about the PyQt mailing list