On Nov 28, 2007 10:21 AM, Horst Herb <<a href="mailto:subscriptions@gnumed.net">subscriptions@gnumed.net</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Wednesday 28 November 2007, Alexandre Badez wrote:<br>> wChapterSelection = QtGui.QDialog()<br>> wChapterSelection.exec_()<br>><br>> And I've got also a bus error.<br>><br>> What really suprise me, is that I already use QDialog elsewhere, and I
<br>> didn't had any problem with this.<br><br></div>app = QApplication(sys.argv)<br>wChapterSelection = QtGui.QDialog()<br>wChapterSelection.show()<br>app.exec_()<br><br>would work.<br>I am a newbie to PyQt4, so I don't know whether you can just run a widget
<br>itself without creating an application first - but if you do, it works<br><br>Horst<br><font color="#888888"><br></font></blockquote></div><br>Thanks Horst.<br><br>I know it work, and I can do it as you type.<br>But the problem in your exemple, is that the show is not blocking so you can do something like
<br><br>myDialog = myDialogClass()<br><br>myDialog.exec_()<br><br>if myDialog.result == myDialog.accept():<br> # do something<br>else:<br> #do something else<br><br>-- <br>Alex<br><br>