-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from spyder-ide/feature/import-qtsvg
PR: Add explicit imports to QtSvg module
- Loading branch information
Showing
1 changed file
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# ----------------------------------------------------------------------------- | ||
# Copyright © 2009- The Spyder Development Team | ||
# | ||
# Licensed under the terms of the MIT License | ||
# (see LICENSE.txt for details) | ||
# ----------------------------------------------------------------------------- | ||
"""Provides QtSvg classes and functions.""" | ||
|
||
""" | ||
Provides QtSvg classes and functions. | ||
""" | ||
|
||
from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError | ||
|
||
# Local imports | ||
from qtpy import PYQT4, PYQT5, PYSIDE, PythonQtError | ||
|
||
if PYQT5: | ||
from PyQt5.QtSvg import * | ||
from PyQt5.QtSvg import (QGraphicsSvgItem, QSvgGenerator, QSvgRenderer, | ||
QSvgWidget) | ||
elif PYQT4: | ||
from PyQt4.QtSvg import * | ||
from PyQt4.QtSvg import (QGraphicsSvgItem, QSvgGenerator, QSvgRenderer, | ||
QSvgWidget) | ||
elif PYSIDE: | ||
from PySide.QtSvg import * | ||
from PySide.QtSvg import (QGraphicsSvgItem, QSvgGenerator, QSvgRenderer, | ||
QSvgWidget) | ||
else: | ||
raise PythonQtError('No Qt bindings could be found') | ||
|
||
del PYQT4, PYQT5, PYSIDE |