Dynamic dive trip list column widths

Compute the default widths for the columns in the dive trip list from
their header and (expected) content length rather than some fixed pixel
sizes.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Giuseppe Bilotta 2014-10-15 15:30:49 +02:00 committed by Dirk Hohndel
parent 10351b3495
commit f18bcd6607
3 changed files with 63 additions and 8 deletions

View file

@ -20,9 +20,11 @@ public:
explicit StarWidgetsDelegate(QWidget *parent = 0);
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
const QSize& starSize() const;
private:
QWidget *parentWidget;
QSize minStarSize;
};
class ComboBoxDelegate : public QStyledItemDelegate {