diff options
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 06b691c17..d77dd07aa 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -22,9 +22,18 @@ #include <QMenu> #include <QFileDialog> +class DiveListDelegate : public QStyledItemDelegate{ +public: + DiveListDelegate(){} + QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const { + return QSize(50,22); + } +}; + DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelection(false), sortColumn(0), currentOrder(Qt::DescendingOrder), searchBox(new QLineEdit(this)) { + setItemDelegate(new DiveListDelegate ); setUniformRowHeights(true); setItemDelegateForColumn(DiveTripModel::RATING, new StarWidgetsDelegate()); QSortFilterProxyModel *model = new QSortFilterProxyModel(this); |