[PyQt] Problem with a simple QDialog
alexandre.badez at gmail.com
Wed Nov 28 09:40:58 GMT 2007
On Nov 28, 2007 10:21 AM, Horst Herb <subscriptions at gnumed.net> wrote:
> On Wednesday 28 November 2007, Alexandre Badez wrote:
> > wChapterSelection = QtGui.QDialog()
> > wChapterSelection.exec_()
> > And I've got also a bus error.
> > What really suprise me, is that I already use QDialog elsewhere, and I
> > didn't had any problem with this.
> app = QApplication(sys.argv)
> wChapterSelection = QtGui.QDialog()
> would work.
> I am a newbie to PyQt4, so I don't know whether you can just run a widget
> itself without creating an application first - but if you do, it works
I know it work, and I can do it as you type.
But the problem in your exemple, is that the show is not blocking so you can
do something like
myDialog = myDialogClass()
if myDialog.result == myDialog.accept():
# do something
#do something else
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt