pg.mkQApp: Pass default application name to Qt, added documentation
This commit is contained in:
parent
6f4048596b
commit
be1ed14bd0
@ -329,9 +329,18 @@ if m is not None and list(map(int, m.groups())) < versionReq:
|
|||||||
|
|
||||||
|
|
||||||
QAPP = None
|
QAPP = None
|
||||||
def mkQApp():
|
def mkQApp(name="pyqtgraph", qt_args=[]):
|
||||||
global QAPP
|
"""
|
||||||
|
Creates new QApplication or returns current instance if existing.
|
||||||
|
|
||||||
|
============== =================================================================================
|
||||||
|
**Arguments:**
|
||||||
|
name Application name, passed to Qt
|
||||||
|
qt_args Array of command line arguments passed to Qt
|
||||||
|
============== =================================================================================
|
||||||
|
"""
|
||||||
|
global QAPP
|
||||||
QAPP = QtGui.QApplication.instance()
|
QAPP = QtGui.QApplication.instance()
|
||||||
if QAPP is None:
|
if QAPP is None:
|
||||||
QAPP = QtGui.QApplication([])
|
QAPP = QtGui.QApplication([name] + qt_args)
|
||||||
return QAPP
|
return QAPP
|
||||||
|
Loading…
Reference in New Issue
Block a user