diff options
author | Marius Bugge Monsen <mmonsen@trolltech.com> | 2009-06-24 12:01:28 (GMT) |
---|---|---|
committer | Marius Bugge Monsen <mmonsen@trolltech.com> | 2009-06-24 12:12:43 (GMT) |
commit | 127e68d3dc4ff83293d7e364af870e019fe7cd17 (patch) | |
tree | 17d534e7f8feb78ddb5326ec6ec985cf27c03153 /src/gui/itemviews/qtableview.cpp | |
parent | 353dcfd307853da289fdd245410e2e07358624a0 (diff) | |
download | Qt-127e68d3dc4ff83293d7e364af870e019fe7cd17.zip Qt-127e68d3dc4ff83293d7e364af870e019fe7cd17.tar.gz Qt-127e68d3dc4ff83293d7e364af870e019fe7cd17.tar.bz2 |
Fix the painting of item view background when items are disabled.
Change QTableView to use the style to draw the background. Change QCommonStyle to draw the background correctly when the item is disabled.
Task-number: 250682
Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/gui/itemviews/qtableview.cpp')
-rw-r--r-- | src/gui/itemviews/qtableview.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 1d37b59..c676237 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -488,8 +488,7 @@ void QTableViewPrivate::drawCell(QPainter *painter, const QStyleOptionViewItemV4 opt.state |= QStyle::State_HasFocus; } - if (opt.features & QStyleOptionViewItemV2::Alternate) - painter->fillRect(opt.rect, opt.palette.brush(QPalette::AlternateBase)); + q->style()->drawPrimitive(QStyle::PE_PanelItemViewRow, &opt, painter, q); if (const QWidget *widget = editorForIndex(index).editor) { painter->save(); |