File tree Expand file tree Collapse file tree
lib/matplotlib/backends/qt4_editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def choose_color(self):
7979 def get_color (self ):
8080 return self ._color
8181
82- @QtCore .pyqtSignature ("QColor" )
82+ @QtCore .Slot ("QColor" )
8383 def set_color (self , color ):
8484 if color != self ._color :
8585 self ._color = color
@@ -88,7 +88,7 @@ def set_color(self, color):
8888 pixmap .fill (color )
8989 self .setIcon (QtGui .QIcon (pixmap ))
9090
91- color = QtCore .pyqtProperty ("QColor" , get_color , set_color )
91+ color = QtCore .Property ("QColor" , get_color , set_color )
9292
9393def col2hex (color ):
9494 """Convert matplotlib color to hex before passing to Qt"""
@@ -97,8 +97,7 @@ def col2hex(color):
9797def to_qcolor (color ):
9898 """Create a QColor from a matplotlib color"""
9999 qcolor = QtGui .QColor ()
100- if isinstance (color , QtCore .QString ):
101- color = str (color )
100+ color = str (color )
102101 try :
103102 color = col2hex (color )
104103 except ValueError :
You can’t perform that action at this time.
0 commit comments