Qt 4.3: Qt 3 Support Members for QVariant

|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# Qt 3 Support Members for QVariant

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.

- QVariant class reference

### Public Functions

- QVariant ( bool b, int dummy )
- QBitArray & asBitArray ()
- bool & asBool ()
- QByteArray & asByteArray ()
- QByteArray & asCString ()
- QDate & asDate ()
- QDateTime & asDateTime ()
- double & asDouble ()
- int & asInt ()
- QList<QVariant> & asList ()
- qlonglong & asLongLong ()
- QMap<QString, QVariant> & asMap ()
- QPoint & asPoint ()
- QRect & asRect ()
- QSize & asSize ()
- QString & asString ()
- QStringList & asStringList ()
- QTime & asTime ()
- uint & asUInt ()
- qulonglong & asULongLong ()
- bool canCast ( Type t ) const
- bool cast ( Type t )
- const QByteArray toCString () const

## Member Function Documentation

### QVariant::QVariant ( bool b, int dummy )

Use the QVariant(bool) constructor instead.

### QBitArray & QVariant::asBitArray ()

Use toBitArray() instead.

### bool & QVariant::asBool ()

Use toBool() instead.

### QByteArray & QVariant::asByteArray ()

Use toByteArray() instead.

### QByteArray & QVariant::asCString ()

Use toByteArray() instead.

### QDate & QVariant::asDate ()

Use toDate() instead.

### QDateTime & QVariant::asDateTime ()

Use toDateTime() instead.

### double & QVariant::asDouble ()

Use toDouble() instead.

### int & QVariant::asInt ()

Use toInt() instead.

### QList<QVariant> & QVariant::asList ()

Use toList() instead.

### qlonglong & QVariant::asLongLong ()

Use toLongLong() instead.

### QMap<QString, QVariant> & QVariant::asMap ()

Use toMap() instead.

### QPoint & QVariant::asPoint ()

Use toPoint() instead.

### QRect & QVariant::asRect ()

Use toRect() instead.

### QSize & QVariant::asSize ()

Use toSize() instead.

### QString & QVariant::asString ()

Use toString() instead.

### QStringList & QVariant::asStringList ()

Use toStringList() instead.

### QTime & QVariant::asTime ()

Use toTime() instead.

### uint & QVariant::asUInt ()

Use toUInt() instead.

### qulonglong & QVariant::asULongLong ()

Use toULongLong() instead.

### bool QVariant::canCast ( Type t ) const

Use canConvert() instead.

### bool QVariant::cast ( Type t )

Use convert() instead.

### const QByteArray QVariant::toCString () const

Use toByteArray() instead.