Im having issues implementing my little window into a full Qt Application. Let me explain...
im using NUKE (by the foundry) that is built using PyQt/PySide. Im builing just a quick dialog that pops up and lets you choose stuff.
I've built other dialogs and they work fine.
this current project tell me : "A QApplication instance already exisits"
this is where the problem is, i think:
def ElementBrowserShow():
window = MainDialog()
window.show()
sys.exit(app.exec_())
def ElementBrowserShow():
app = QApplication(sys.argv)
window = MainDialog()
window.show()
sys.exit(app.exec_())
To copy to clipboard, switch view to plain text mode
When I omit the 2nd line, i get an error on the 5th line where "app" is not defined. if i also omit the 5th line, the dialog flashes on and then quits.
i read that i can implement app = QtGui.QApplication.instance(), but it doesnt work either. Not sure if im using it correctly.
def ElementBrowserShow():
window = MainDialog()
window.show()
sys.exit(app.exec_())
def ElementBrowserShow():
app = QtGui.QApplication.instance()
window = MainDialog()
window.show()
sys.exit(app.exec_())
To copy to clipboard, switch view to plain text mode
Bookmarks