Skip to content

Commit

Permalink
fix the import of pyface.ui.qt.color for the new update (#1025)
Browse files Browse the repository at this point in the history
* fix the import of pyface.ui.qt.color for the new update

* also add qt4 import to keep compatibility

---------

Co-authored-by: Chengyu Liu <cyliu@aus552cyliu.local>
  • Loading branch information
homosapien-lcy and Chengyu Liu authored Apr 11, 2023
1 parent daf6fcc commit e9f97e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion enable/trait_defs/ui/qt4/rgba_color_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
# -----------------------------------------------------------------------------

from pyface.qt import QtGui
from pyface.ui.qt4.color import toolkit_color_to_rgba, rgba_to_toolkit_color

try:
from pyface.ui.qt.color import toolkit_color_to_rgba, rgba_to_toolkit_color
# compatible with pyface < 8.0.0
except ModuleNotFoundError:
from pyface.ui.qt4.color import toolkit_color_to_rgba, rgba_to_toolkit_color

from traits.trait_base import SequenceTypes

Expand Down

0 comments on commit e9f97e3

Please sign in to comment.