[PyQt] Re: Have to close dialog boxes twice
Thorsten Kampe
thorsten at thorstenkampe.de
Sun Oct 21 13:33:38 BST 2007
* David Boddie (Sun, 21 Oct 2007 18:29:29 +0200)
> On Sun Oct 21 09:33:32 BST 2007, Thorsten Kampe wrote:
> > Now I tried to separate the layout from the code logic by using Qt
> > Designer and generating and importing an Ui file. This works fine,
> > too. Except that with the modified version I have to click twice on
> > the close or Ok button to close the dialog boxes and I have no idea
> > why. Can anyone give a clueless person a clue?
>
> It sounds like you need to put decorators before the slots that are
> invoked when an action is triggered:
>
> @pyqtSignature("")
> def on_action_About_triggered(self):
> QtGui.QMessageBox.about(self, self.tr('About Application'),
> self.tr('My Application does something\n'
> 'This software comes without warranty, liability or support!'))
>
> This is because there are effectively two forms of the triggered() signal:
> one with a boolean parameter and one without. You need to specify which one
> of these you want to receive.
Yes, that was it. Thanks a lot...
Thorsten
More information about the PyQt
mailing list