Qt - use QListWidgetItem user data
From TaskDepender
(→Implementation) |
(→Custom class definition) |
||
Line 25: | Line 25: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | To ensure that the class is compatible with QVariant, the following is added<ref>[http://doc.qt.nokia.com/4.7-snapshot/qmetatype.html QMetaType Class Reference - Qt 4.7 reference]</ref>: | + | To ensure that the class is compatible with QVariant, the following is added <ref>[http://doc.qt.nokia.com/4.7-snapshot/qmetatype.html QMetaType Class Reference - Qt 4.7 reference]</ref>: |
<syntaxhighlight lang="cpp-qt"> | <syntaxhighlight lang="cpp-qt"> |