[Qt-interest] [emmanuel_mayssat at lynceantech.com: [PyQt] quitting QApplication on end of state machine]

emmanuel_mayssat at lynceantech.com emmanuel_mayssat at lynceantech.com
Tue May 10 00:05:21 CEST 2011


Here is an email sent to the pyqt mailing list, whcih is also relevant in the qt maling list.
--
E

----- Forwarded message from emmanuel_mayssat at lynceantech.com -----

Date: Mon, 9 May 2011 11:44:21 -0700
From: emmanuel_mayssat at lynceantech.com
To: PyQt Mailing List <pyqt at riverbankcomputing.com>
Subject: [PyQt] quitting QApplication on end of state machine


Hello,

I have the following code:

[...]
if __name__ == "__main__":
    import sys
    qApp = QApplication(sys.argv)
    #machine = StartupStateMachine()
    machine = QStateMachine()
    #QObject.connect(machine, SIGNAL('finished()'), QApplication.instance(), SLOT(quit()))
    QObject.connect(machine, SIGNAL('finished()'), qApp, SLOT(quit()))
    machine.start()
    #sys.exit(qApp.exec_())
    qApp.exec_()

when run the state machine is not even started and the qApp exits immediately.
what is happening?

PS: looked at code for meego... 
http://apidocs.meego.com/1.1/core/html/qt4/statemachine-api.html
I am using Qt4.6

-- 
Emmanuel
_______________________________________________
PyQt mailing list    PyQt at riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

----- End forwarded message -----

-- 
Emmanuel



More information about the Qt-interest-old mailing list