Skip to content

Commit 1225cdf

Browse files
committed
PyQt5 does not need to extract from QVariant values
1 parent 2205d78 commit 1225cdf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pytestqt/qt_compat.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ def make_variant(value=None):
142142
self.QSortFilterProxyModel = QtCore.QSortFilterProxyModel
143143

144144
def extract_from_variant(variant):
145-
"""returns python object from the given QVariant"""
146-
if isinstance(variant, QtCore.QVariant):
147-
return variant.value()
145+
"""not needed in PyQt5: Qt API always returns pure python objects"""
148146
return variant
149147

150148
def make_variant(value=None):

0 commit comments

Comments
 (0)