diff options
author | David Boddie <dboddie@trolltech.com> | 2009-08-26 12:35:45 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-08-26 12:35:45 (GMT) |
commit | 7e30c92186878beb300a13093c3668ae8a10f2be (patch) | |
tree | 313aa7f7a8345e65b7803bae1cb68ad866bdadbc /src/gui/math3d/qvector2d.cpp | |
parent | b98042831f4f6f6c5844965731b2dd64f27c076e (diff) | |
parent | aeb4251c76560a070ce22320be00e860950b4668 (diff) | |
download | Qt-7e30c92186878beb300a13093c3668ae8a10f2be.zip Qt-7e30c92186878beb300a13093c3668ae8a10f2be.tar.gz Qt-7e30c92186878beb300a13093c3668ae8a10f2be.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/math3d/qvector2d.cpp')
-rw-r--r-- | src/gui/math3d/qvector2d.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp index 1662020..35c86a1 100644 --- a/src/gui/math3d/qvector2d.cpp +++ b/src/gui/math3d/qvector2d.cpp @@ -43,6 +43,7 @@ #include "qvector3d.h" #include "qvector4d.h" #include <QtCore/qdebug.h> +#include <QtCore/qvariant.h> #include <QtCore/qmath.h> QT_BEGIN_NAMESPACE @@ -402,6 +403,14 @@ QVector4D QVector2D::toVector4D() const \sa toPoint(), toVector3D() */ +/*! + Returns the 2D vector as a QVariant. +*/ +QVector2D::operator QVariant() const +{ + return QVariant(QVariant::Vector2D, this); +} + #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QVector2D &vector) |