[PyQt] Simple qml app hanging with PyQt5.7 x86_64 wheel on linux
Phil Thompson
phil at riverbankcomputing.com
Tue Jul 26 18:41:06 BST 2016
On 26 Jul 2016, at 5:54 pm, Russell Warren <russ at perspexis.com> wrote:
>
> Thanks for the recent 5.7 wheel release, especially the inclusion of QtQuick stuff.
>
> However, I'm trying a simple hello world application on linux x86_4 (debian 8) and it is hanging.
>
> Python launcher is a minimal one:
>
> #!/usr/bin/env python
> import sys
> from PyQt5 import QtGui, QtQml
>
> app = QtGui.QGuiApplication(sys.argv)
>
> engine = QtQml.QQmlApplicationEngine()
> engine.load("hello_world.qml")
>
> sys.exit(app.exec_())
> #EOF
>
> QML is the stock HelloWorld.qml:
>
> import QtQuick 2.0
>
> Rectangle {
> id: page
> width: 320; height: 480
> color: "lightgray"
>
> Text {
> id: helloText
> text: "Hello world!"
> y: 30
> anchors.horizontalCenter: page.horizontalCenter
> font.pointSize: 24; font.bold: true
> }
> }
>
> When executed it just hangs in the Qt event loop (app.exec_()) without displaying anything.
>
> Here's an strace of it:
> https://goo.gl/Wdp4Xu
>
> That strace was clipped since the polling just goes on forever.
>
> Any ideas what is preventing display? OpenGL is working elsewhere (eg: glxgears runs fine).
I don't think it has anything to with the wheels. It works fine if you use QQuickView. It would be interesting to see what a C++ version of the launcher would do.
Phil
More information about the PyQt
mailing list