Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# Compatibility Members for QVariant

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

QVariant class reference

### Public Functions

- QVariant ( const QColorGroup & val )
- QVariant ( bool b, int dummy )
- QBitmap & asBitmap ()
- QBrush & asBrush ()
- QColor & asColor ()
- QColorGroup & asColorGroup ()
- QCursor & asCursor ()
- QFont & asFont ()
- QIcon & asIconSet ()
- QImage & asImage ()
- QKeySequence & asKeySequence ()
- QPalette & asPalette ()
- QPen & asPen ()
- QPixmap & asPixmap ()
- QPoint & asPoint ()
- QPointArray & asPointArray ()
- QRect & asRect ()
- QRegion & asRegion ()
- QSize & asSize ()
- QSizePolicy & asSizePolicy ()
- QColorGroup toColorGroup () const

## Member Function Documentation

### QVariant::QVariant ( const QColorGroup & val )

QVariant's don't store color groups directly; store and retrieve a QPalette instead.

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

Use the single-argument overload instead.

### QBitmap & QVariant::asBitmap ()

Use toBitmap() instead.

### QBrush & QVariant::asBrush ()

Use toBrush() instead.

### QColor & QVariant::asColor ()

Use toColor() instead.

### QColorGroup & QVariant::asColorGroup ()

QVariant's don't store color groups directly; store and retrieve a QPalette instead.

### QCursor & QVariant::asCursor ()

Use toCursor() instead.

### QFont & QVariant::asFont ()

Use toFont() instead.

### QIcon & QVariant::asIconSet ()

Use toIcon() instead.

### QImage & QVariant::asImage ()

Use toImage() instead.

### QKeySequence & QVariant::asKeySequence ()

Use toKeySequence() instead.

### QPalette & QVariant::asPalette ()

Use toPalette() instead.

### QPen & QVariant::asPen ()

Use toPen() instead.

### QPixmap & QVariant::asPixmap ()

Use toPixmap() instead.

### QPoint & QVariant::asPoint ()

Use toPoint() instead.

### QPointArray & QVariant::asPointArray ()

Use toPointArray() instead.

### QRect & QVariant::asRect ()

Use toRect() instead.

### QRegion & QVariant::asRegion ()

Use toRegion() instead.

### QSize & QVariant::asSize ()

Use toSize() instead.

### QSizePolicy & QVariant::asSizePolicy ()

Use toSizePolicy() instead.

### QColorGroup QVariant::toColorGroup () const

QVariant's don't store color groups directly; store and retrieve a QPalette instead. See toPalette().