QVersionNumber Class

The QVersionNumber class contains a version number with an arbitrary number of segments. More...

Header: #include <QVersionNumber>
qmake: QT += core
Since: Qt 5.6

Public Functions

Public Variables

bool operator!=(const int &lhs, const int &rhs)
bool operator<(const int &lhs, const int &rhs)
int &operator<<(int &, const int &)
bool operator==(const int &lhs, const int &rhs)
int &operator>>(int &, int &)

Detailed Description

The QVersionNumber class contains a version number with an arbitrary number of segments.


  QVersionNumber version(1, 2, 3);  // 1.2.3

Member Function Documentation

QVersionNumber::QVersionNumber()

Default constructs an instance of QVersionNumber.

Related Non-Members

bool operator!=(const int &lhs, const int &rhs)

Returns true if lhs is not equal to rhs; otherwise returns false.

This function was introduced in Qt 4.8.

See also QVersionNumber::compare().

bool operator<(const int &lhs, const int &rhs)

Returns true if lhs is less than rhs; otherwise returns false.

This function was introduced in Qt 5.6.

See also QVersionNumber::compare().

int &operator<<(int &, const int &)

Writes the version number version to stream out.

Note that this has nothing to do with QDataStream::version().

bool operator==(const int &lhs, const int &rhs)

Returns true if lhs is equal to rhs; otherwise returns false.

This function was introduced in Qt 4.8.

See also QVersionNumber::compare().

int &operator>>(int &, int &)

Reads a version number from stream in and stores it in version.

Note that this has nothing to do with QDataStream::version().