67
67
68
68
def _setup_pyqt5 ():
69
69
global QtCore , QtGui , QtWidgets , __version__ , is_pyqt5 , \
70
- _isdeleted , _devicePixelRatio , _setDevicePixelRatio , _getSaveFileName
70
+ _isdeleted , _getSaveFileName
71
71
72
72
if QT_API == QT_API_PYQT5 :
73
73
from PyQt5 import QtCore , QtGui , QtWidgets
@@ -89,14 +89,10 @@ def _isdeleted(obj): return not shiboken2.isValid(obj)
89
89
def is_pyqt5 ():
90
90
return True
91
91
92
- # self.devicePixelRatio() returns 0 in rare cases
93
- def _devicePixelRatio (obj ): return obj .devicePixelRatio () or 1
94
- def _setDevicePixelRatio (obj , factor ): obj .setDevicePixelRatio (factor )
95
-
96
92
97
93
def _setup_pyqt4 ():
98
94
global QtCore , QtGui , QtWidgets , __version__ , is_pyqt5 , \
99
- _isdeleted , _devicePixelRatio , _setDevicePixelRatio , _getSaveFileName
95
+ _isdeleted , _getSaveFileName
100
96
101
97
def _setup_pyqt4_internal (api ):
102
98
global QtCore , QtGui , QtWidgets , \
@@ -149,9 +145,6 @@ def _isdeleted(obj): return not shiboken.isValid(obj)
149
145
def is_pyqt5 ():
150
146
return False
151
147
152
- def _devicePixelRatio (obj ): return 1
153
- def _setDevicePixelRatio (obj , factor ): pass
154
-
155
148
156
149
if QT_API in [QT_API_PYQT5 , QT_API_PYSIDE2 ]:
157
150
_setup_pyqt5 ()
0 commit comments