[PyQt] stuck on non-modal dialog

David J Brooks daeg at houston.rr.com
Wed May 23 21:56:04 BST 2007


On Wednesday 23 May 2007 02:57:45 pm Henrik Pauli wrote:
> On 2007. May 23., Hans-Peter Jansen wrote:
> > Am Mittwoch, 23. Mai 2007 16:26 schrieb Phil Thompson:
> > > On Wednesday 23 May 2007 3:18 pm, David J Brooks wrote:
> > > > On Wednesday 23 May 2007 02:22:41 am Phil Thompson wrote:
> > > > > On Wednesday 23 May 2007 2:20 am, David J Brooks wrote:
> > > > > > class findDialog(QtGui.QDialog):
> > > > > >     def __init__(self, parent=None):
> > > > > >         QtGui.QDialog.__init__(self, parent)
> > > > > >         self.ui=Ui_findDialog()
> > > > > >         self.ui.setupUi(self)
> > > > > >         self.setModal=(False)
> > > > >
> > > > > You might want to look at the line above.
> > > >
> > > > I'm looking, but I'm not sure what I'm meant to see. setModal(False)
> > > > shouldn't do anything at all, because the dialog should be non-modal
> > > > by default.
> > >
> > > That's not what the line says.
> >
> > You're overwriting the class method with a tuple. That cannot do, what
> > you're expecting..
>
> Rather a single value.  A single-item tuple would be (False,) if I remember
> correctly :)
>
> > Phil sparse answers are legendary, he approaching a S/N ratio near 100%.
> >
> :D  I think it's good, makes one have to think!

Darnit.. I looked at that all day and didn't spot it. In the end I just 
commented it out because (if written correctly) it wouldn't do anything 
anyway. The problem with the dialog turned out to be a single checkbox in the 
ui file that had been set to ApplicationModal in Designer. Changing that 
fixes everything, except my weary eyeballs.

Thanks for the pointers!
David
-- 
Sendmail may be safely run set-user-id to root.
		-- Eric Allman, "Sendmail Installation Guide"


More information about the PyQt mailing list