以下成員源於類 QVariant 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。
(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 ) |
Returns true if the given 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 ().