Hi. I try to run PySide GUI inside Photoscan, menu is added, but when i try to run script from menu, GUI show and after close automatically.
mainForm.exec() works, but i need to open this widget in non modal mode.
from PySide.QtCore import *
from PySide.QtGui import *
class MainForm(QDialog):
def __init__(self):
QDialog.__init__(self, None)
self.setWindowTitle("Hello")
def main():
app = QCoreApplication.instance()
if app == None:
app = QApplication([])
mainForm = MainForm()
mainForm.show()
# mainForm.exec()
PhotoScan.app.addMenuItem("TestMenu/TestScript", main)