mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-20 00:06:36 -04:00
Since QVariant.Type doesn't exist in PyQt6, we patch it back in by setting them to their QMetaType.Type equivalents. This means that code which calls eg: field = QgsField('my_field', QVariant.Int) will work as usual under Qt5, while on Qt6 builds it will work without change. (Since QVariant.Int is QMetaType.Type.Int, and the PyQGIS6 sip conversion code will kick in and transparently convert the QMetaType.Type.Int value to QVariant::Int when calling the underlying c++ method)