[PyQt] Error with QtQuick.Dialogs

Phil Thompson phil at riverbankcomputing.com
Fri Feb 21 22:43:36 GMT 2014


On 21-02-2014 6:46 pm, Charlie Gentil wrote:
> Le vendredi 21 février 2014, 17:58:20 Phil Thompson a écrit :
>> On 20-02-2014 2:43 pm, Charlie Gentil wrote:
>> > Hi,
>> >
>> > I have the following error :
>> >
>> > "Qt Warning - invalid keysym: dead_actute"
>> >
>> > My Python code :
>> >
>> > #!/usr/bin/env python
>> >
>> > # -*- coding: utf-8 -*-
>> >
>> > import sys
>> >
>> > from PyQt5.QtCore import QObject, QUrl, Qt
>> >
>> > from PyQt5.QtWidgets import QApplication
>> >
>> > from PyQt5.QtQml import QQmlApplicationEngine
>> >
>> > if __name__ == "__main__":
>> >  app = QApplication(sys.argv)
>> >
>> >  engine = QQmlApplicationEngine()
>> >
>> >  ctx = engine.rootContext()
>> >
>> >  ctx.setContextProperty("mainAppPy", engine)
>> >
>> >  engine.load('Test.qml')
>> >
>> >  win = engine.rootObjects()[0]
>> >
>> >  win.show()
>> >
>> >  sys.exit(app.exec_())
>> >
>> > My QML code :
>> >
>> > import QtQuick 2.2
>> >
>> > import QtQuick.Window 2.0
>> >
>> > import QtQuick.Controls 1.1
>> >
>> > import QtQuick.Dialogs 1.1
>> >
>> > ApplicationWindow {
>> >
>> >  title: qsTr("Test Invoke")
>> >
>> >  width: 200
>> >
>> >  height: 100
>> >
>> >  Button{
>> >
>> >  y : 70
>> >
>> >  text : "About"
>> >
>> >  onClicked: msg.visible = true
>> >
>> >  }
>> >
>> >  MessageDialog {
>> >
>> >  id : msg
>> >
>> >  title: "About"
>> >
>> >  visible : false
>> >
>> >  icon: StandardIcon.Information
>> >
>> >  text: qsTr("Test")
>> >
>> >  }
>> >
>> > }
>> >
>> > NOTE : If I use qmlscene, I have not a problem.
>> >
>> > Have you a idea ?
>> >
>> > Thanks
>> >
>> > Charlie
>>
>> As it says, it's a warning not an error. I can't reproduce it and I
>> can't see how PyQt could cause it.
>>
>> Phil
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
> Hi,
>
> As for me, I forgot to mention that the window is not displayed by
> running the
> python script
>
> Charlie

Try tonight's snapshot. I did fix a deadlock in the load() method.

Phil


More information about the PyQt mailing list