diff options
Diffstat (limited to 'sowatchui/watchscannermodel.cpp')
-rw-r--r-- | sowatchui/watchscannermodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sowatchui/watchscannermodel.cpp b/sowatchui/watchscannermodel.cpp index 8dd8d1e..f2c76f7 100644 --- a/sowatchui/watchscannermodel.cpp +++ b/sowatchui/watchscannermodel.cpp @@ -8,6 +8,7 @@ WatchScannerModel::WatchScannerModel(QObject *parent) : { QHash<int, QByteArray> roles = roleNames(); roles[Qt::DisplayRole] = QByteArray("title"); + roles[Qt::DecorationRole] = QByteArray("iconSource"); roles[Qt::StatusTipRole] = QByteArray("subtitle"); roles[ObjectRole] = QByteArray("object"); setRoleNames(roles); @@ -58,6 +59,8 @@ QVariant WatchScannerModel::data(const QModelIndex &index, int role) const switch (role) { case Qt::DisplayRole: return info["name"]; + case Qt::DecorationRole: + return QVariant(SOWATCH_RESOURCES_DIR "/sowatch64.png"); case Qt::StatusTipRole: return info["address"]; case ObjectRole: |