# QVector2D Class Reference

### [com.trolltech.qt.gui package]

### Constructor

- void QVector2D()
- void QVector2D(QPoint point)
- void QVector2D(QPointF point)
- void QVector2D(QVector3D vector)
- void QVector2D(QVector4D vector)
- void QVector2D(qreal xpos, qreal ypos)

### Constructor Properties

- prototype: The QVector2D prototype object
- qreal dotProduct(QVector2D v1, QVector2D v2)

### Prototype Object Properties

- bool isNull()
- qreal length()
- qreal lengthSquared()
- void normalize()
- QVector2D normalized()
- QVector2D operator_add_assign(QVector2D vector)
- QVector2D operator_divide_assign(qreal divisor)
- bool operator_equal(QVector2D v2)
- QVector2D operator_multiply_assign(QVector2D vector)
- QVector2D operator_subtract_assign(QVector2D vector)
- void readFrom(QDataStream arg__1)
- void setX(qreal x)
- void setY(qreal y)
- QPoint toPoint()
- QPointF toPointF()
- QVector3D toVector3D()
- QVector4D toVector4D()
- void writeTo(QDataStream arg__1)
- qreal x()
- qreal y()

### Instance Properties

QVector2D objects have no special properties beyond those inherited from the QVector2D prototype object.