File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
lib/matplotlib/backends/qt4_editor Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def choose_color(self):
79
79
def get_color (self ):
80
80
return self ._color
81
81
82
- @QtCore .pyqtSignature ("QColor" )
82
+ @QtCore .Slot ("QColor" )
83
83
def set_color (self , color ):
84
84
if color != self ._color :
85
85
self ._color = color
@@ -88,7 +88,7 @@ def set_color(self, color):
88
88
pixmap .fill (color )
89
89
self .setIcon (QtGui .QIcon (pixmap ))
90
90
91
- color = QtCore .pyqtProperty ("QColor" , get_color , set_color )
91
+ color = QtCore .Property ("QColor" , get_color , set_color )
92
92
93
93
def col2hex (color ):
94
94
"""Convert matplotlib color to hex before passing to Qt"""
@@ -97,8 +97,7 @@ def col2hex(color):
97
97
def to_qcolor (color ):
98
98
"""Create a QColor from a matplotlib color"""
99
99
qcolor = QtGui .QColor ()
100
- if isinstance (color , QtCore .QString ):
101
- color = str (color )
100
+ color = str (color )
102
101
try :
103
102
color = col2hex (color )
104
103
except ValueError :
You can’t perform that action at this time.
0 commit comments