added ipython support for developing

This commit is contained in:
Marcel Paffrath 2017-04-10 13:32:53 +02:00
parent 3f7a61736a
commit 50d3c5f235
2 changed files with 18 additions and 3 deletions

View File

@ -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,7 +1207,8 @@ def main():
pylot_app.processEvents()
splash.finish(pylot_form)
pylot_app.exec_()
if app_created:
pylot_app.exec_()
if __name__ == "__main__":

View File

@ -1 +1 @@
49a4-dirty
3f7a-dirty