[PyQt] PyQtDeploy with QML application

Phil Thompson phil at riverbankcomputing.com
Mon Apr 7 11:25:47 BST 2014


On 01-04-2014 10:52 am, Charlie Gentil wrote:
> Hi,
>
> Having successfully used pyqtdeploy with the example of the doc, I 
> now
> try with a simple QML application.
>
> In pyqtdeploy I added the PyQt modules:
> QtCore
> QtGui
> QtQuick
> QtWidgets
> QtNetwork
>
> and I have included libraries importlib, types and warning
>
> Here is the message after the make command :
>
> [charlie at charlie build]$ make
>
> ...
>
> ...
>
> ...
>
> g++ -Wl,-O1 -o main main.o pyqtdeploy_main.o mfsimport.o
> main_qml_plugin_import.o main_plugin_import.o qrc_application.o
> qrc_stdlib.o qrc_site-packages.o
> -L/home/dev/python/lib/python3.4/site-packages
> -L/home/dev/python/lib/python3.4/site-packages/PyQt5 -lsip 
> -lQtWidgets
> -lQtCore -lQtNetwork -lQtQuick -lQtGui -L/home/dev/python/lib
> -lpython3.4m -L/home/dev/qt/lib -lQt5Widgets -lgobject-2.0
> -L/home/dev/qt/qml/QtQuick.2 -lqtquick2plugin -lQt5Quick -lQt5Qml
> -lQt5Network -L/home/dev/qt/plugins/platforms -lqxcb -lX11-xcb -lXi
> -lxcb-render-util -lSM -lICE -lxcb-glx -lxcb-render -lxcb-keysyms
> -ldbus-1 -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes
> -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-xkb -lxkbcommon
> -lQt5PlatformSupport -lfontconfig -lfreetype -lXrender -lXext -lX11
> -ludev -lmtdev -lQt5DBus -lQt5Gui -ljpeg -lpng -lEGL -lQt5Core -lz
> -licui18n -licuuc -lpcre16 -lm -ldl -lgthread-2.0 -pthread -lglib-2.0
> -lrt -lGL -lpthread -lutil
>
> 
> /home/dev/python/lib/python3.4/site-packages/PyQt5/libQtNetwork.a(sipQtNetworkcmodule.o):(.bss+0x28):
> définitions multiples de « pyqt5_get_connection_parts »
>
> 
> /home/dev/python/lib/python3.4/site-packages/PyQt5/libQtWidgets.a(sipQtWidgetscmodule.o):(.bss+0x40):
> défini pour la première fois ici
>
> collect2: erreur: ld a retourné 1 code d'état d'exécution
>
> Makefile:246: recipe for target 'main' failed
>
> make: *** [main] Error 1
>
> [charlie at charlie build]$
>
> In attachments : main.py, mainQML.qml, testQML.pdy).
>
> Charlie

There are a couple of things to do...

Use the current PyQt5 snapshot - it has more fixes for static builds.

Add the QtQml module to your .pdy file.

Specify 'qrc:/application/mailQML.qml' as the URL of the QML file. I 
will probably try and change things so that you don't need to specify 
the '/application' part, or (maybe) have a separate configuration page 
for QML files.

Phil


More information about the PyQt mailing list