Hi,<br>I need to "emulate" a terminal and need to automaticly run the code after<br>the QDialog shows and close the QDialog after it ends the task.<br>How can I do that, the best I made was this:<br><br style="font-family:courier new,monospace">
<font size="1"><span style="font-family:courier new,monospace">class ConsoleClass(QDialog): ...</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">def main():</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> app = QApplication(sys.argv)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> main.form = ConsoleClass()</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> main.form.show()</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> app.processEvents()</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">main()</span></font><br>
<br>It works fine <br>