[PyQt] PyQt5 NULL QVariant
Matthias Kuhn
matthias at opengis.ch
Fri May 13 23:15:39 BST 2016
On 05/11/2016 02:21 PM, Matthias Kuhn wrote:
> I just found the great pyqt5_register_from_qvariant_convertor API and
> it seems to work. So I guess we can even make this compatible with
> older versions and without upstream changes. Do you see any drawbacks
> from such an approach?
FYI, this is the approach which we use now.
An upstream solution will still be appreciated.
Convertor code:
https://github.com/qgis/QGIS/blob/master/python/core/conversions.sip#L1971-L1981
Convertor registration code:
https://github.com/qgis/QGIS/blob/master/python/sip_helpers/qgissiphelper.cpp
Monkeypatching some QVariant methods:
https://github.com/qgis/QGIS/blob/master/python/PyQt/PyQt5/QtCore.py#L5-L51
Matthias
More information about the PyQt
mailing list