PDA

View Full Version : [PyQt] QDialog Window Not Popping up when in Function


TDgirl
07-25-2012, 08:29 PM
Hi,


I'm using PyQt 4.9.1 in Maya 2012 & 2013, and my QDialog window is not popping up when being called from inside a function.

I’ve done this before & have been successful, but this particular one is not working.

Could there be a setting I messed up or missed?

This is my code:







from PyQt4 import QtGui (http://qt-project.org/doc/QtGui.html), uic, QtCore (http://qt-project.org/doc/QtCore.html), Qt (http://qt-project.org/doc/Qt.html)
def MAIN():
widget = uic.loadUi("/PATH/TO/file.ui")
widget.show()
MAIN()


(I tried to simplify it as much as possible, but nothing works…)

But it works if I do this:






from PyQt4 import QtGui (http://qt-project.org/doc/QtGui.html), uic, QtCore (http://qt-project.org/doc/QtCore.html), Qt (http://qt-project.org/doc/Qt.html)
widget = uic.loadUi("/PATH/TO/file.ui")
widget.show()


Any ideas? Thanks!!

If the ui code would be useful, please let me know.

TDgirl
07-31-2012, 05:58 PM
Solved in this post (http://forums.cgsociety.org/showthread.php?p=7378920#post7378920).

(Sorry about repeated post. I don't know how to delete yet...)

CGTalk Moderation
07-31-2012, 05:58 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.