Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QVariant class is a safe generic container for the most common Qt data types. More...
#include <QVariant>
Inherits QCoreVariant.
The QVariant class is a safe generic container for the most common Qt data types.
This class is derived from QCoreVariant. It includes all the types from QCoreVariant and additional types which make sense for GUI applications.
Constructs an invalid variant.
Constructs a new variant with a date value of val.
Constructs a new variant with a time value of val.
Constructs a new variant with a date/time value of val.
Constructs a new variant that holds the list of variants given in val.
Constructs a new variant that holds a map whose keys are strings and whose values are variants, as given in val.
Constructs a new variant that holds the list of variants given in val.
Constructs a new variant that holds a map whose keys are strings and whose values are variants, as given in val.
Constructs a new variant with a font value of val.
Constructs a new variant with a pixmap value of val.
Constructs a new variant with an image value of val.
Because QImage is explicitly shared, you may need to pass a deep copy to the variant using QImage::copy(), e.g. if you intend changing the image you've passed later on.
Constructs a new variant with a brush value of val.
Constructs a new variant with a color value of val.
Constructs a new variant with a color palette value of val.
Constructs a new variant with an icon set value of val.
Constructs a new variant with a point array value of val.
Because QPointArray is explicitly shared, you may need to pass a deep copy to the variant using QPointArray::copy(), e.g. if you intend changing the point array you've passed later on.
Constructs a new variant with a region value of val.
Constructs a new variant with a bitmap value of val.
Constructs a new variant with a cursor value of val.
Constructs a new variant with a key sequence value of val.
Constructs a new variant with a pen value of val.
Constructs a new variant with a size policy value of val.
Constructs a variant with the value of other.
Constructs a variant with the value of other.
Constructs a new variant with an integer value of val.
Constructs a new variant with an unsigned integer value of val.
Constructs a new variant with a long integer value of val.
Constructs a new variant with an unsigned long integer value of val.
Constructs a new variant with a double value of val.
Constructs a new variant with a boolean value of val.
Constructs a new variant with a byte array value of val.
Constructs a new variant with a byte array value of val.
Constructs a new variant with a bit array value of val.
Constructs a new variant with a string value of val.
Constructs a new variant with a string value of val.
Constructs a new variant with a string list value of val.
Returns the variant as a QBitmap if the variant has type() Bitmap; otherwise returns a null QBitmap.
Returns the variant as a QBrush if the variant has type() Brush; otherwise returns a default brush (with all black colors).
Returns the variant as a QColor if the variant has type() Color; otherwise returns an invalid color.
Returns the variant as a QCursor if the variant has type() Cursor; otherwise returns the default arrow cursor.
Returns the variant as a QFont if the variant has type() Font; otherwise returns the application's default font.
Returns the variant as a QIcon if the variant has type() Icon; otherwise returns a null QIcon.
Use toIcon() instead.
Returns the variant as a QImage if the variant has type() Image; otherwise returns a null image.
Returns the variant as a QKeySequence if the variant has type() KeySequence, Int or String; otherwise returns an empty key sequence.
Note that not all Ints and Strings are valid key sequences and in such cases an empty key sequence will be returned.
Returns the variant as a QPalette if the variant has type() Palette; otherwise returns a copy of the application's default palette.
Returns the variant as a QPen if the variant has type() Pen; otherwise returns a default pen that will draw 1-pixel wide solid black lines.
Returns the variant as a QPixmap if the variant has type() Pixmap; otherwise returns a null pixmap.
Returns the variant as a QPointArray if the variant has type() PointArray; otherwise returns a null QPointArray.
Returns the variant as a QRegion if the variant has type() Region; otherwise returns an empty QRegion.
Returns the variant as a QSizePolicy if the variant has type() SizePolicy; otherwise returns a minimally initialized QSizePolicy.
Copyright © 2004 Trolltech | Trademarks | Qt 4.0.0-b1 |