[PyQt] Run code after the QtDialog shows
starglider.dev
starglider.dev at gmail.com
Thu May 24 21:25:12 BST 2012
Sorry gmail send it automatic.
Hi,
I need to "emulate" a terminal and need to automaticly run the code after
the QDialog shows and close the QDialog after it ends the task.
The best I find was this:
class ConsoleClass(QDialog): ...
def main():
app = QApplication(sys.argv)
main.form = ConsoleClass()
main.form.show()
app.processEvents()
run_my_code()
main()
It works fine, but if I call it from a another form it closes all the
application.
How can I prevent the main application to be closed?
Thank you in advance for your help.
zorze
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120524/d3bc696d/attachment.html>
More information about the PyQt
mailing list