以下成员源于类 QVariant 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
								
(obsolete)
								
								enum
							 | 
							Type { Invalid, BitArray, Bitmap, Bool, Brush, …, UserType } | 
								
(obsolete)
								
								bool
							 | 
							operator< (const QVariant & v ) const | 
								
(obsolete)
								
								bool
							 | 
							operator<= (const QVariant & v ) const | 
								
(obsolete)
								
								bool
							 | 
							operator> (const QVariant & v ) const | 
								
(obsolete)
								
								bool
							 | 
							operator>= (const QVariant & v ) const | 
								
(obsolete)
								
								bool
							 | 
							qVariantCanConvert (const QVariant & value ) | 
								
(obsolete)
								
								QVariant
							 | 
							qVariantFromValue (const T & value ) | 
								
(obsolete)
								
								void
							 | 
							qVariantSetValue (QVariant & variant , const T & value ) | 
								
(obsolete)
								
								T
							 | 
							qVariantValue (const QVariant & value ) | 
This enum is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
使用 QMetaType::Type 代替
This enum type defines the types of variable that a QVariant can contain.
| 常量 | 值 | 描述 | 
|---|---|---|
								
QVariant::Invalid
								
							 | 
							
								
QMetaType::UnknownType
								
							 | 
							no type | 
								
QVariant::BitArray
								
							 | 
							
								
QMetaType::QBitArray
								
							 | 
							a QBitArray | 
								
QVariant::Bitmap
								
							 | 
							
								
QMetaType::QBitmap
								
							 | 
							a QBitmap | 
								
QVariant::Bool
								
							 | 
							
								
QMetaType::Bool
								
							 | 
							a bool | 
								
QVariant::Brush
								
							 | 
							
								
QMetaType::QBrush
								
							 | 
							a QBrush | 
								
QVariant::ByteArray
								
							 | 
							
								
QMetaType::QByteArray
								
							 | 
							a QByteArray | 
								
QVariant::Char
								
							 | 
							
								
QMetaType::QChar
								
							 | 
							a QChar | 
								
QVariant::Color
								
							 | 
							
								
QMetaType::QColor
								
							 | 
							a QColor | 
								
QVariant::Cursor
								
							 | 
							
								
QMetaType::QCursor
								
							 | 
							a QCursor | 
								
QVariant::Date
								
							 | 
							
								
QMetaType::QDate
								
							 | 
							a QDate | 
								
QVariant::DateTime
								
							 | 
							
								
QMetaType::QDateTime
								
							 | 
							a QDateTime | 
								
QVariant::Double
								
							 | 
							
								
QMetaType::Double
								
							 | 
							a double | 
								
QVariant::EasingCurve
								
							 | 
							
								
QMetaType::QEasingCurve
								
							 | 
							a QEasingCurve | 
								
QVariant::Uuid
								
							 | 
							
								
QMetaType::QUuid
								
							 | 
							a QUuid | 
								
QVariant::ModelIndex
								
							 | 
							
								
QMetaType::QModelIndex
								
							 | 
							a QModelIndex | 
								
QVariant::PersistentModelIndex
								
							 | 
							
								
QMetaType::QPersistentModelIndex
								
							 | 
							a QPersistentModelIndex (since 5.5) | 
								
QVariant::Font
								
							 | 
							
								
QMetaType::QFont
								
							 | 
							a QFont | 
								
QVariant::Hash
								
							 | 
							
								
QMetaType::QVariantHash
								
							 | 
							a QVariantHash | 
								
QVariant::Icon
								
							 | 
							
								
QMetaType::QIcon
								
							 | 
							a QIcon | 
								
QVariant::Image
								
							 | 
							
								
QMetaType::QImage
								
							 | 
							a QImage | 
								
QVariant::Int
								
							 | 
							
								
QMetaType::Int
								
							 | 
							an int | 
								
QVariant::KeySequence
								
							 | 
							
								
QMetaType::QKeySequence
								
							 | 
							a QKeySequence | 
								
QVariant::Line
								
							 | 
							
								
QMetaType::QLine
								
							 | 
							a QLine | 
								
QVariant::LineF
								
							 | 
							
								
QMetaType::QLineF
								
							 | 
							a QLineF | 
								
QVariant::List
								
							 | 
							
								
QMetaType::QVariantList
								
							 | 
							a QVariantList | 
								
QVariant::Locale
								
							 | 
							
								
QMetaType::QLocale
								
							 | 
							a QLocale | 
								
QVariant::LongLong
								
							 | 
							
								
QMetaType::LongLong
								
							 | 
							a qlonglong | 
								
QVariant::Map
								
							 | 
							
								
QMetaType::QVariantMap
								
							 | 
							a QVariantMap | 
								
QVariant::Matrix
								
							 | 
							
								
QMetaType::QMatrix
								
							 | 
							a QMatrix | 
								
QVariant::Transform
								
							 | 
							
								
QMetaType::QTransform
								
							 | 
							a QTransform | 
								
QVariant::Matrix4x4
								
							 | 
							
								
QMetaType::QMatrix4x4
								
							 | 
							a QMatrix4x4 | 
								
QVariant::Palette
								
							 | 
							
								
QMetaType::QPalette
								
							 | 
							a QPalette | 
								
QVariant::Pen
								
							 | 
							
								
QMetaType::QPen
								
							 | 
							a QPen | 
								
QVariant::Pixmap
								
							 | 
							
								
QMetaType::QPixmap
								
							 | 
							a QPixmap | 
								
QVariant::Point
								
							 | 
							
								
QMetaType::QPoint
								
							 | 
							a QPoint | 
								
QVariant::PointF
								
							 | 
							
								
QMetaType::QPointF
								
							 | 
							a QPointF | 
								
QVariant::Polygon
								
							 | 
							
								
QMetaType::QPolygon
								
							 | 
							a QPolygon | 
								
QVariant::PolygonF
								
							 | 
							
								
QMetaType::QPolygonF
								
							 | 
							a QPolygonF | 
								
QVariant::Quaternion
								
							 | 
							
								
QMetaType::QQuaternion
								
							 | 
							a QQuaternion | 
								
QVariant::Rect
								
							 | 
							
								
QMetaType::QRect
								
							 | 
							a QRect | 
								
QVariant::RectF
								
							 | 
							
								
QMetaType::QRectF
								
							 | 
							a QRectF | 
								
QVariant::RegExp
								
							 | 
							
								
QMetaType::QRegExp
								
							 | 
							a QRegExp | 
								
QVariant::RegularExpression
								
							 | 
							
								
QMetaType::QRegularExpression
								
							 | 
							a QRegularExpression | 
								
QVariant::Region
								
							 | 
							
								
QMetaType::QRegion
								
							 | 
							a QRegion | 
								
QVariant::Size
								
							 | 
							
								
QMetaType::QSize
								
							 | 
							a QSize | 
								
QVariant::SizeF
								
							 | 
							
								
QMetaType::QSizeF
								
							 | 
							a QSizeF | 
								
QVariant::SizePolicy
								
							 | 
							
								
QMetaType::QSizePolicy
								
							 | 
							a QSizePolicy | 
								
QVariant::String
								
							 | 
							
								
QMetaType::QString
								
							 | 
							a QString | 
								
QVariant::StringList
								
							 | 
							
								
QMetaType::QStringList
								
							 | 
							a QStringList | 
								
QVariant::TextFormat
								
							 | 
							
								
QMetaType::QTextFormat
								
							 | 
							a QTextFormat | 
								
QVariant::TextLength
								
							 | 
							
								
QMetaType::QTextLength
								
							 | 
							a QTextLength | 
								
QVariant::Time
								
							 | 
							
								
QMetaType::QTime
								
							 | 
							a QTime | 
								
QVariant::UInt
								
							 | 
							
								
QMetaType::UInt
								
							 | 
							a uint | 
								
QVariant::ULongLong
								
							 | 
							
								
QMetaType::ULongLong
								
							 | 
							a qulonglong | 
								
QVariant::Url
								
							 | 
							
								
QMetaType::QUrl
								
							 | 
							a QUrl | 
								
QVariant::Vector2D
								
							 | 
							
								
QMetaType::QVector2D
								
							 | 
							a QVector2D | 
								
QVariant::Vector3D
								
							 | 
							
								
QMetaType::QVector3D
								
							 | 
							a QVector3D | 
								
QVariant::Vector4D
								
							 | 
							
								
QMetaType::QVector4D
								
							 | 
							a QVector4D | 
								
QVariant::UserType
								
							 | 
							
								
QMetaType::User
								
							 | 
							Base value for user-defined types. | 
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
						Compares this
						
							QVariant
						
						with
						
							v
						
						并返回
						
true
						
						if this is less than
						
							v
						
						.
					
注意: Comparability might not be availabe for the type stored in this QVariant or in v .
警告: To make this function work with a custom type registered with qRegisterMetaType (), its comparison operator must be registered using QMetaType::registerComparators ().
This operator is deprecated as it cannot establish a total order required for most use of this operator, which is the reason you cannot use QVariant as the key of a QMap .
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
						Compares this
						
							QVariant
						
						with
						
							v
						
						并返回
						
true
						
						if this is less or equal than
						
							v
						
						.
					
注意: Comparability might not be available for the type stored in this QVariant or in v .
警告: To make this function work with a custom type registered with qRegisterMetaType (), its comparison operator must be registered using QMetaType::registerComparators ().
This operator is deprecated as it cannot establish a total order.
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
						Compares this
						
							QVariant
						
						with
						
							v
						
						并返回
						
true
						
						if this is larger than
						
							v
						
						.
					
注意: Comparability might not be available for the type stored in this QVariant or in v .
警告: To make this function work with a custom type registered with qRegisterMetaType (), its comparison operator must be registered using QMetaType::registerComparators ().
This operator is deprecated as it cannot establish a total order.
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
						Compares this
						
							QVariant
						
						with
						
							v
						
						并返回
						
true
						
						if this is larger or equal than
						
							v
						
						.
					
注意: Comparability might not be available for the type stored in this QVariant or in v .
警告: To make this function work with a custom type registered with qRegisterMetaType (), its comparison operator must be registered using QMetaType::registerComparators ().
This operator is deprecated as it cannot establish a total order.
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
						返回
						
true
						
						若给定
						value
						can be converted to the template type specified; otherwise returns
						
false
						
						.
					
此函数相当于 QVariant::canConvert ( value ).
注意: 此函数是为不支持成员模板函数的 MSVC 6 提供的解决方案。建议在新代码中使用其它形式。
另请参阅 QVariant::canConvert ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
						Returns a variant containing a copy of the given
						value
						with template type
						
T
						
						.
					
此函数相当于 QVariant::fromValue ( value ).
注意: 此函数是为不支持成员模板函数的 MSVC 6 提供的解决方案。建议在新代码中使用其它形式。
For example, a QObject pointer can be stored in a variant with the following code:
QObject *object = getObjectFromSomewhere(); QVariant data = QVariant::fromValue(object);
另请参阅 QVariant::fromValue ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
						设置内容为给定
						
							variant
						
						to a copy of the
						value
						with the specified template type
						
T
						
						.
					
此函数相当于 QVariant::setValue ( value ).
注意: 此函数是为不支持成员模板函数的 MSVC 6 提供的解决方案。建议在新代码中使用其它形式。
另请参阅 QVariant::setValue ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
						返回给定
						value
						被转换成模板类型
						
T
						
						.
					
此函数相当于 QVariant::value <T>( value ).
注意: 此函数是为不支持成员模板函数的 MSVC 6 提供的解决方案。建议在新代码中使用其它形式。
另请参阅 QVariant::value () 和 qvariant_cast ().