Addon Manager: Add fallbacks for PySide to WidgetFilterSelector
Ensure that this part of the Addon Manager can be tested outside FreeCAD by falling back to explicit PySide imports.
This commit is contained in:
committed by
Yorik van Havre
parent
98fbe71a54
commit
8edb649d97
@@ -38,18 +38,12 @@ except ImportError:
|
||||
|
||||
# Get whatever version of PySide we can
|
||||
try:
|
||||
import PySide # Use the FreeCAD wrapper
|
||||
from PySide import QtCore, QtWidgets # Use the FreeCAD wrapper
|
||||
except ImportError:
|
||||
try:
|
||||
import PySide6 # Outside FreeCAD, try Qt6 first
|
||||
|
||||
PySide = PySide6
|
||||
from PySide6 import QtCore, QtWidgets # Outside FreeCAD, try Qt6 first
|
||||
except ImportError:
|
||||
import PySide2 # Fall back to Qt5 (if this fails, Python will kill this module's import)
|
||||
|
||||
PySide = PySide2
|
||||
|
||||
from PySide import QtCore, QtWidgets
|
||||
from PySide2 import QtCore, QtWidgets # Fall back to Qt5
|
||||
|
||||
|
||||
class FilterType(IntEnum):
|
||||
|
||||
Reference in New Issue
Block a user