[PyQt] [wizard] done, accept, reject

Colin McPhail colin.mcphail at talktalk.net
Thu Aug 12 12:55:25 BST 2010


On 12 Aug 2010, at 09:56, Preisig, Heinz A wrote:

> I am running into problems controlling the exit from the wizard. Tried several things but seem not to find a solution. Probably overlook something...?
> 
> The code, attached below is executed on ubuntu 10.04 and I also tried on kubuntu.
> 
> The problem is with done and reject. The task does not exit, but persists. I have to kill the process.
> When eliminating done and reject, the task exits cleanly on finish and cancel. 
> 
> If I add the statement
> return 1
> to done, I get an error message on the type being returned.

Have you tried calling the original versions of accept() and done() from the end of your custom ones?  Something like:

    def done(self, r):
        print 'done', r
        super(Ui_WizardImpl, self).done(r)


    def accept(self):
        print 'accepted'
        super(Ui_WizardImpl, self).accept()
 
This seemed to do the trick on Mac OS X.

Regards,
-- Colin


More information about the PyQt mailing list