support both Qt5 and Qt6

This commit is contained in:
pls.153 2022-01-25 14:41:35 +01:00
parent 07f5fd05a0
commit 4440c06e70
6 changed files with 21 additions and 11 deletions

View file

@ -127,7 +127,11 @@ cl_object qset2(cl_object l_obj, cl_object l_args) {
var = toInt(l_val);
}
else {
#if QT_VERSION < 0x060000
var = toQVariant(l_val, mp.type());
#else
var = toQVariant(l_val, mp.typeId());
#endif
}
if (!mp.write(qobject, var)) {
goto fail;