@@ -105,7 +105,7 @@ def _create_qApp():
105105 app = QtWidgets .QApplication .instance ()
106106 if app is None :
107107 # check for DISPLAY env variable on X11 build of Qt
108- if QtCore .QT_VERSION_STR >= "5." :
108+ if QtCore .qVersion () >= "5." :
109109 try :
110110 importlib .import_module (
111111 # i.e. PyQt5.QtX11Extras or PySide2.QtX11Extras.
@@ -331,7 +331,7 @@ def mouseReleaseEvent(self, event):
331331 FigureCanvasBase .button_release_event (self , x , y , button ,
332332 guiEvent = event )
333333
334- if QtCore .QT_VERSION_STR >= "5." :
334+ if QtCore .qVersion () >= "5." :
335335 def wheelEvent (self , event ):
336336 x , y = self .mouseEventCoords (event )
337337 # from QWheelEvent::delta doc
@@ -688,7 +688,7 @@ def basedir(self):
688688 return str (cbook ._get_data_path ('images' ))
689689
690690 def _icon (self , name ):
691- if QtCore .QT_VERSION_STR >= '5.' :
691+ if QtCore .qVersion () >= '5.' :
692692 name = name .replace ('.png' , '_large.png' )
693693 pm = QtGui .QPixmap (str (cbook ._get_data_path ('images' , name )))
694694 qt_compat ._setDevicePixelRatio (pm , qt_compat ._devicePixelRatio (self ))
0 commit comments