Image Formats NG
|
This is a QAbstractTableModel subclass that is capable of displaying a QVariantMap. More...
Inherits QAbstractTableModel.
Public Types | |
enum | Column { Key, Value } |
This enum represents possible VariantMapModel columns. More... | |
Public Member Functions | |
VariantMapModel (QObject *parent=nullptr) | |
Constructs a VariantMapModel with the given parent. | |
VariantMapModel (const QVariantMap &map, QObject *parent=nullptr) | |
Constructs a VariantMapModel with the given map and parent. | |
int | rowCount (const QModelIndex &parent) const override |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
int | columnCount (const QModelIndex &parent) const override |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QVariant | data (const QModelIndex &index, int role) const override |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | setVariantMap (const QVariantMap &map) |
Sets the data of the model from the given map. | |
This is a QAbstractTableModel subclass that is capable of displaying a QVariantMap.
Model has two columns: Key and Value.
This enum represents possible VariantMapModel columns.
Enumerator | |
---|---|
Key | Index of the key column. |
Value | Index of the value column. |