qt
: Qt bindings#
Common wrapper over Python Qt bindings:
If a Qt binding is already loaded, it will be used. If the QT_API environment variable is set to one of the supported Qt bindings (case insensitive), this binding is loaded if available, otherwise the different Qt bindings are tried in this order: PyQt5, PySide6, PyQt6.
The name of the loaded Qt binding is stored in the BINDING variable.
This module provides a flat namespace over Qt bindings by importing all symbols from QtCore, QtGui, QtWidgets and QtPrintSupport packages and if available from QtOpenGL and QtSvg packages.
Example of using silx.gui.qt
module:
>>> from silx.gui import qt
>>> app = qt.QApplication([])
>>> widget = qt.QWidget()
For an alternative solution providing a structured namespace, see qtpy.