Draw a nice rounded rect around the avaliable column names

This drawns a nice rounded rect around the avaliable column names, using
antialiasing.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-01-07 15:19:19 -02:00 committed by Dirk Hohndel
parent ce9d972ffa
commit 3b654438b6

View file

@ -493,5 +493,10 @@ QSize TagDragDelegate::sizeHint(const QStyleOptionViewItem & option, const QMode
void TagDragDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const
{
painter->save();
painter->setRenderHints(QPainter::Antialiasing);
painter->drawRoundedRect(option.rect.adjusted(4,4,-4,-4), 5, 5);
painter->restore();
QStyledItemDelegate::paint(painter, option, index);
}