[PyQt] QtQuick ApplicationWindow

Phil Thompson phil at riverbankcomputing.com
Sat Nov 16 22:11:32 GMT 2013


On Sat, 16 Nov 2013 20:22:50 +0100, Fabien Castan <fabcastan at gmail.com>
wrote:
> Hi,
> 
> I'm trying to create a qtquick application using PyQt5.
> I would like to use an ApplicationWindow as the top level item of my qml
> file. To do that, I shouldn't use the QQuickView but directly
QQmlComponent
> as it's done here with a non-graphic example:
> http://pyqt.sourceforge.net/Docs/PyQt5/qml.html
> 
> My sample code:
> https://github.com/buttleofx/testsQml/tree/qmlApplicationWindow
> 
> But it crashes:
> A
> B
> C
> D
> QObject::connect: Cannot connect (null)::destroyed(QObject*) to
> QWindow::screenDestroyed(QObject*)
> Erreur de segmentation (core dumped)
> 
> Same result if I use Window instead of ApplicationWindow.
> 
> Any idea?
> 
> Regards,
> Fabien

It's not a non-graphic application. Use a QGuiApplication instead of a
QCoreApplication.

Phil


More information about the PyQt mailing list