From 4e774db12d5ebe7a20eded6dd434a289e27999e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Wed, 2 Feb 2022 14:19:58 +0100 Subject: New upstream version 1.0.0+dfsg --- src/silx/gui/qt/__init__.py | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/silx/gui/qt/__init__.py (limited to 'src/silx/gui/qt/__init__.py') diff --git a/src/silx/gui/qt/__init__.py b/src/silx/gui/qt/__init__.py new file mode 100644 index 0000000..915c89b --- /dev/null +++ b/src/silx/gui/qt/__init__.py @@ -0,0 +1,54 @@ +# coding: utf-8 +# /*########################################################################## +# +# Copyright (c) 2004-2021 European Synchrotron Radiation Facility +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +# ###########################################################################*/ +"""Common wrapper over Python Qt bindings: + +- `PyQt5 `_ +- `PySide2 `_ +- `PySide6 `_ + +If a Qt binding is already loaded, it will use it, otherwise the different +Qt bindings are tried in this order: PyQt5, PySide2, PySide6. + +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 :mod:`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 `_. +""" + +from ._qt import * # noqa +if BINDING in ('PySide2', 'PySide6'): + # Import loadUi wrapper + from ._pyside_dynamic import loadUi # noqa +from ._utils import * # noqa -- cgit v1.2.3