added ipython support for developing
This commit is contained in:
parent
3f7a61736a
commit
50d3c5f235
17
QtPyLoT.py
17
QtPyLoT.py
@ -1160,9 +1160,23 @@ class MainWindow(QMainWindow):
|
||||
form.show()
|
||||
|
||||
|
||||
def create_window():
|
||||
app_created = False
|
||||
app = QCoreApplication.instance()
|
||||
#check for existing app (when using ipython)
|
||||
if app is None:
|
||||
app = QApplication(sys.argv)
|
||||
app_created = True
|
||||
app.references = set()
|
||||
#app.references.add(window)
|
||||
#window.show()
|
||||
return app, app_created
|
||||
|
||||
|
||||
def main():
|
||||
# create the Qt application
|
||||
pylot_app = QApplication(sys.argv)
|
||||
pylot_app, app_created = create_window()
|
||||
#pylot_app = QApplication(sys.argv)
|
||||
pixmap = QPixmap(":/splash/splash.png")
|
||||
splash = QSplashScreen(pixmap)
|
||||
splash.show()
|
||||
@ -1193,6 +1207,7 @@ def main():
|
||||
pylot_app.processEvents()
|
||||
|
||||
splash.finish(pylot_form)
|
||||
if app_created:
|
||||
pylot_app.exec_()
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
49a4-dirty
|
||||
3f7a-dirty
|
||||
|
Loading…
Reference in New Issue
Block a user