diff options
Diffstat (limited to 'src/gui/math3d/qvector4d.cpp')
-rw-r--r-- | src/gui/math3d/qvector4d.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp index a2efff7..11eb4c4 100644 --- a/src/gui/math3d/qvector4d.cpp +++ b/src/gui/math3d/qvector4d.cpp @@ -43,6 +43,7 @@ #include "qvector3d.h" #include "qvector2d.h" #include <QtCore/qdebug.h> +#include <QtCore/qvariant.h> #include <QtCore/qmath.h> QT_BEGIN_NAMESPACE @@ -500,6 +501,14 @@ QVector3D QVector4D::toVector3DAffine() const \sa toPoint(), toVector2D() */ +/*! + Returns the 4D vector as a QVariant. +*/ +QVector4D::operator QVariant() const +{ + return QVariant(QVariant::Vector4D, this); +} + #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QVector4D &vector) |