Init QVariant in Qt6-compatible way

7220-lua-add-a-general-purpose-lexical-parser
Andrei Kortunov 2 years ago
parent 0b3ba26d86
commit 99a575b663

@ -364,7 +364,11 @@ void CSVWorld::CommandDelegate::setEditorData(QWidget* editor, const QModelIndex
if (!n.isEmpty())
{
if (!variant.isValid())
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
variant = QVariant(editor->property(n).metaType(), (const void*)nullptr);
#else
variant = QVariant(editor->property(n).userType(), (const void*)nullptr);
#endif
editor->setProperty(n, variant);
}
}

Loading…
Cancel
Save