Macro qml::qvarlist
[−]
[src]
macro_rules! qvarlist { (__ $v:ident, [$($inside:tt)*], $($rest:tt)*) => { ... }; (__ $v:ident, [$($inside:tt)*]) => { ... }; (__ $v:ident, $varname:expr, $($rest:tt)*) => { ... }; (__ $v:ident, $varname:expr) => { ... }; ($($rest:tt)*) => { ... }; }
Eases forming of QVariantList
(QVariant
of array).
To be more precise, macro generates Vec<QVariant>
which implements Into<QVariant>
and Into<QVariantList>
.
Examples
let shortcut: Vec<QVariant> = qvarlist![["John", [2, 2]], ["Ivan", [10, 0]], ["Mary", [0, 1]]]; let qvariant: QVariant = shortcut.into();