Improve TransferListDelegate::sizeHint

This commit is contained in:
Chocobo1
2016-04-04 17:58:21 +08:00
parent 93d8cadaaf
commit 4eadda5c9a
2 changed files with 10 additions and 13 deletions

View File

@@ -49,11 +49,6 @@ public:
TransferListDelegate(QObject *parent);
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const;
// Reimplementing sizeHint() because the 'name' column contains text+icon.
// When that WHOLE column goes out of view(eg user scrolls horizontally)
// the rows shrink if the text's height is smaller than the icon's height.
// This happens because icon from the 'name' column is no longer drawn.
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const;
private: