Previous topic

qarbon.qt.gui.action

Next topic

qarbon.qt.gui.axeswidget

This Page

qarbon.qt.gui.application

Helper functions to manage QApplication.

Most common use case:

from qarbon.external.qt import QtGui
from qarbon.qt.gui.application import Application

app = Application()
label = QtGui.QLabel("Hello, world!")
label.show()
app.exec_()

The advantage here is you can call Application() anywhere on your program.

Functions

Application Returns a QApplication.
qarbon.qt.gui.application.Application(argv=None, **properties)[source]

Returns a QApplication.

If the process has initialized before a QApplication it returns the existing instance, otherwise it creates a new one.

When a QApplication is created it takes argv into account. If argv is None (default), it take arguments from sys.argv.

If argv is given and a QApplication already exists, argv will have no effect.

Parameters:argv – optional arguments to QApplication. If the QApplication is already initialized, argv will have no effect.

Example:

from qarbon.external.qt import QtGui
from qarbon.qt.gui.application import Application

app = Application()
label = QtGui.QLabel("Hello, world!")
label.show()
app.exec_()
Parameters:properties – currently unused
Returns:the QApplication
Return type:QtGui.QApplication