Skip to content

Commit

Permalink
MAINT: add compatibility with pyface 8.0.0 (#1033)
Browse files Browse the repository at this point in the history
Co-authored-by: Chengyu Liu <cyliu@aus552cyliu.local>
  • Loading branch information
homosapien-lcy and Chengyu Liu authored Apr 17, 2023
1 parent e9f97e3 commit 5088b72
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions enable/trait_defs/ui/qt4/rgba_color_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@
# subclass of the abstract ToolkitEditorFactory class
# (in traitsui.api) with qt4-specific methods defined.
# We need to override the implementations of the qt4-specific methods here.
from traitsui.qt4.color_editor import (
ToolkitEditorFactory as BaseColorToolkitEditorFactory,
)

try:
from traitsui.qt.color_editor import (
ToolkitEditorFactory as BaseColorToolkitEditorFactory,
)
# compatible with pyface < 8.0.0
except ModuleNotFoundError:
from traitsui.qt4.color_editor import (
ToolkitEditorFactory as BaseColorToolkitEditorFactory,
)

# -----------------------------------------------------------------------------
# The PyQt4 ToolkitEditorFactory class:
Expand Down

0 comments on commit 5088b72

Please sign in to comment.