mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-09 12:00:32 -08:00
support both Qt5 and Qt6
This commit is contained in:
parent
07f5fd05a0
commit
4440c06e70
6 changed files with 21 additions and 11 deletions
|
|
@ -225,7 +225,11 @@ TO_CL_FLOAT_4 (QRectF, qrectf, x, y, width, height)
|
|||
|
||||
cl_object from_qvariant(const QVariant& var) {
|
||||
cl_object l_obj = ECL_NIL;
|
||||
#if QT_VERSION < 0x060000
|
||||
const int type = var.type();
|
||||
#else
|
||||
const int type = var.typeId();
|
||||
#endif
|
||||
switch (type) {
|
||||
case QMetaType::Bool: l_obj = var.toBool() ? ECL_T : ECL_NIL; break;
|
||||
case QMetaType::Double: l_obj = ecl_make_doublefloat(var.toDouble()); break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue