Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
f20f7ea8
Commit
f20f7ea8
authored
Dec 06, 2013
by
Daniel Brown
Browse files
fixing QApplication creation for GUI
parent
24535aa5
Changes
1
Hide whitespace changes
Inline
Side-by-side
pykat/finesse.py
View file @
f20f7ea8
...
...
@@ -42,6 +42,9 @@ from pykat.components import Component
from
pykat.commands
import
Command
,
xaxis
from
pykat.gui.gui
import
pyKatGUI
from
PyQt4.QtCore
import
QCoreApplication
from
PyQt4.QtGui
import
QApplication
NO_GUI
=
False
NO_BLOCK
=
"NO_BLOCK"
...
...
@@ -474,12 +477,20 @@ class kat(object):
if
NO_GUI
:
print
"No PyQt4 module was installed so cannot open a GUI"
else
:
self
.
app
=
QCoreApplication
.
instance
()
created
=
False
if
self
.
app
==
None
:
created
=
True
self
.
app
=
QApplication
([
""
])
if
self
.
pykatgui
==
None
:
#self.app = QtGui.QApplication([""])
self
.
pykatgui
=
pyKatGUI
(
self
)
self
.
pykatgui
.
main
()
else
:
self
.
pykatgui
.
show
()
if
created
:
self
.
app
.
exec_
()
def
getComponents
(
self
):
return
self
.
__components
.
values
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment