Skip to content

Commit

Permalink
uic: wrapp pysideuic and pyside2uic imports with try since could be u…
Browse files Browse the repository at this point in the history
…navailable
  • Loading branch information
dalthviz committed Sep 13, 2021
1 parent 32f6c57 commit 1e3c3ca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions qtpy/uic.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,17 @@
if PYSIDE:
from PySide.QtCore import QMetaObject
from PySide.QtUiTools import QUiLoader
from pysideuic import compileUi
try:
from pysideuic import compileUi
except ImportError:
pass
elif PYSIDE2:
from PySide2.QtCore import QMetaObject
from PySide2.QtUiTools import QUiLoader
from pyside2uic import compileUi
try:
from pyside2uic import compileUi
except ImportError:
pass

class UiLoader(QUiLoader):
"""
Expand Down

0 comments on commit 1e3c3ca

Please sign in to comment.