aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r--qt-ui/modeldelegates.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index 1bbf1061b..1ac2f46c6 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -6,6 +6,7 @@
#include <QtDebug>
#include <QPainter>
+#include <QSortFilterProxyModel>
void StarWidgetsDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
@@ -13,7 +14,7 @@ void StarWidgetsDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o
return;
}
- int rating = index.model()->data(index, DiveTripModel::DelegatesRole).toInt();
+ int rating = index.model()->data(index, Qt::DisplayRole).toInt();
if (option.state & QStyle::State_Selected)
painter->fillRect(option.rect, option.palette.highlight());