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:
Qt Code:
  1. def ElementBrowserShow():
  2. app = QApplication(sys.argv)
  3. window = MainDialog()
  4. window.show()
  5. 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.

Qt Code:
  1. def ElementBrowserShow():
  2. app = QtGui.QApplication.instance()
  3. window = MainDialog()
  4. window.show()
  5. sys.exit(app.exec_())
To copy to clipboard, switch view to plain text mode