Proper check for Qt version
This commit is contained in:
@@ -1122,7 +1122,7 @@ class Snapper:
|
||||
mw = Gui.getMainWindow()
|
||||
for w in mw.findChild(QtGui.QMdiArea).findChildren(QtGui.QWidget):
|
||||
if w.metaObject().className() == "SIM::Coin3D::Quarter::QuarterWidget":
|
||||
if int(QtCore.qVersion()) > 4:
|
||||
if int(QtCore.qVersion().split('.')[0]) > 4:
|
||||
device_pixel_ratio = w.devicePixelRatio()
|
||||
return device_pixel_ratio
|
||||
|
||||
@@ -1147,7 +1147,7 @@ class Snapper:
|
||||
qp.end()
|
||||
cur_hot_x = 0.25 * full_icon_size * device_pixel_ratio
|
||||
cur_hot_y = 0.25 * full_icon_size * device_pixel_ratio
|
||||
if int(QtCore.qVersion()) > 4:
|
||||
if int(QtCore.qVersion().split('.')[0]) > 4:
|
||||
new_icon.setDevicePixelRatio(device_pixel_ratio)
|
||||
cur = QtGui.QCursor(new_icon, cur_hot_x, cur_hot_y)
|
||||
return cur
|
||||
|
||||
Reference in New Issue
Block a user