Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Go to the source code of this file.
Functions | |
qDebug ("Type is %s", v.typeName()) | |
v | setValue (5) |
v | setValue (c) |
if (v.canConvert< MyCustomStruct >()) c = v.value<MyCustomStruct>() | |
v | canConvert< int > () |
v | canConvert< QString > () |
v | setValue (s) |
v | canConvert< MyCustomStruct > () |
if (variant.canConvert< QVariantList >()) | |
mapping | insert (7, "Seven") |
mapping | insert (11, "Eleven") |
mapping | insert (42, "Forty-two") |
if (variant.canConvert< QVariantHash >()) | |
Variables | |
QDataStream | out (...) |
[0] | |
QVariant | v (123) = v.toInt() + 100 |
[3] | |
int | x = v.toInt() |
[0] | |
int | z = v.toInt() |
QVariant | y = QVariant::fromValue(nullptr) |
QVariant | variant = color |
[1] | |
QColor | color = variant.value<QColor>() |
[2] | |
int | i = v.toInt() |
QString | s = v.toString() |
[6] | |
MyCustomStruct | c |
MyCustomStruct | c2 = v.value<MyCustomStruct>() |
QList< int > | intList = {7, 11, 42} |
[7] | |
QHash< int, QString > | mapping |
[9] | |
v canConvert< int > | ( | ) |
v canConvert< MyCustomStruct > | ( | ) |
if | ( | v.canConvert< MyCustomStruct > | () | ) | = v.value<MyCustomStruct>() |
if | ( | variant.canConvert< QVariantHash > | () | ) |
Definition at line 127 of file src_corelib_kernel_qvariant.cpp.
if | ( | variant.canConvert< QVariantList > | () | ) |
Definition at line 99 of file src_corelib_kernel_qvariant.cpp.
mapping insert | ( | 11 | , |
"Eleven" | ) |
mapping insert | ( | 42 | , |
"Forty-two" | ) |
mapping insert | ( | 7 | , |
"Seven" | ) |
qDebug | ( | "Type is %s" | , |
v. | typeName() ) |
v setValue | ( | 5 | ) |
MyCustomStruct c |
Definition at line 51 of file src_corelib_kernel_qvariant.cpp.
Referenced by QXcbWMSupport::QXcbWMSupport().
MyCustomStruct c2 = v.value<MyCustomStruct>() |
Definition at line 56 of file src_corelib_kernel_qvariant.cpp.
QColor color = variant.value<QColor>() |
int i = v.toInt() |
Definition at line 48 of file src_corelib_kernel_qvariant.cpp.
QList< int > intList = {7, 11, 42} |
QDataStream out(...) | ( | ... | ) |
[0]
MyCustomStruct s = v.toString() |
Definition at line 27 of file src_corelib_kernel_qvariant.cpp.
Definition at line 18 of file src_corelib_kernel_qvariant.cpp.