[PyQt] QDialog Form Show Possible Race Condition?

John V. Busch jbusch at dataverve.com
Wed Apr 11 20:49:43 BST 2012


Thank you both for your help.

I have fixed this, it seems it was in fact a simple case of scope. I now
define newServiceForm as a member of the class that I am working in.  Doing
this and refering to newServiceForm as self.newServiceForm has corrected my
issue.

Thanks again!

Regards,
John V. Busch

On Wed, Apr 11, 2012 at 12:42 PM, <sole at esrf.fr> wrote:

>
> Quoting Andreas Pakulat <apaku at gmx.de>:
>
>  On 11.04.12 12:26:09, John V. Busch wrote:
>>
>>> I have a bug that only occurs when I am NOT debugging.
>>>
>>> I am very new to pyQT, so please forgive if this is something obvious.
>>>
>>> The following code is called from another QDialog class upon a particular
>>> button click.
>>>
>>>            newServiceForm = QDialog()
>>>            newServiceUI = Ui_Dialog()
>>>            newServiceUI.setupUi(**newServiceForm)
>>>
>>> newServiceUI.**installScriptButton.clicked.**connect(self.**
>>> installScriptButton_clicked)
>>>            newServiceForm.show()
>>>
>>> If I set a breakpoint anywhere in this method the newServiceForm displays
>>> with no issue; however if I allow the application to execute naturally,
>>> the
>>> form never displays.
>>>
>>> I am assuming there is some race condition here internal to QT that is
>>> being created likely due to my misuse.
>>>
>>
>> Once you provide a complete example we might be able to help you. The
>> code above has no obvious errors, but it might well be that you're using
>> it incorrectly.
>>
>>
> It looks as the typical issue of not holding a reference to
> newServiceForm, but as Andreas says, you have to provide a complete example.
>
> Armando
>
>
> ______________________________**_________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.**com/mailman/listinfo/pyqt<http://www.riverbankcomputing.com/mailman/listinfo/pyqt>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120411/c63768de/attachment-0001.html>


More information about the PyQt mailing list