Constructs a new variant with the regexp value \a regExp.
*/
-/*! \since 4.2
- \fn QVariant::QVariant(Qt::GlobalColor color)
-
- Constructs a new variant of type QVariant::Color and initializes
- it with \a color.
-
- This is a convenience constructor that allows \c{QVariant(Qt::blue);}
- to create a valid QVariant storing a QColor.
-
- Note: This constructor will assert if the application does not link
- to the Qt GUI library.
- */
-
QVariant::QVariant(Type type)
{ create(type, 0); }
QVariant::QVariant(int typeOrUserType, const void *copy)
QVariant::QVariant(const QJsonArray &jsonArray) { d.is_null = false; d.type = JsonArray; v_construct<QJsonArray>(&d, jsonArray); }
QVariant::QVariant(const QJsonDocument &jsonDocument) { d.is_null = false; d.type = JsonDocument; v_construct<QJsonDocument>(&d, jsonDocument); }
#endif
-QVariant::QVariant(Qt::GlobalColor color) { create(62, &color); }
/*!
Returns the storage type of the value stored in the variant.
#ifndef QT_BOOTSTRAPPED
QVariant(const QEasingCurve &easing);
#endif
- QVariant(Qt::GlobalColor color);
QVariant& operator=(const QVariant &other);
#ifdef Q_COMPILER_RVALUE_REFS
v_construct<QCursor>(x, copy);
break;
#endif
- case 62: {
- // small 'trick' to let a QVariant(Qt::blue) create a variant
- // of type QColor
- x->type = QVariant::Color;
- QColor color(*reinterpret_cast<const Qt::GlobalColor *>(copy));
- v_construct<QColor>(x, &color);
- break;
- }
#ifndef QT_NO_MATRIX4X4
case QVariant::Matrix4x4:
v_construct<QMatrix4x4>(x, copy);