added ipython support for developing
This commit is contained in:
parent
3f7a61736a
commit
50d3c5f235
19
QtPyLoT.py
19
QtPyLoT.py
@ -1160,9 +1160,23 @@ class MainWindow(QMainWindow):
|
|||||||
form.show()
|
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():
|
def main():
|
||||||
# create the Qt application
|
# 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")
|
pixmap = QPixmap(":/splash/splash.png")
|
||||||
splash = QSplashScreen(pixmap)
|
splash = QSplashScreen(pixmap)
|
||||||
splash.show()
|
splash.show()
|
||||||
@ -1193,7 +1207,8 @@ def main():
|
|||||||
pylot_app.processEvents()
|
pylot_app.processEvents()
|
||||||
|
|
||||||
splash.finish(pylot_form)
|
splash.finish(pylot_form)
|
||||||
pylot_app.exec_()
|
if app_created:
|
||||||
|
pylot_app.exec_()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -1 +1 @@
|
|||||||
49a4-dirty
|
3f7a-dirty
|
||||||
|
Loading…
Reference in New Issue
Block a user