summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-09-17 12:12:12 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-09-17 12:12:12 (GMT)
commitd242d2f863936a4e3e2b07a4d84b7f0c4b4eb817 (patch)
treee730948edb60a568525e670cfd3b3734b1cfc738 /src/gui
parent4aea5ebee1ddaa9c05471b0562443d0bab079e68 (diff)
downloadQt-d242d2f863936a4e3e2b07a4d84b7f0c4b4eb817.zip
Qt-d242d2f863936a4e3e2b07a4d84b7f0c4b4eb817.tar.gz
Qt-d242d2f863936a4e3e2b07a4d84b7f0c4b4eb817.tar.bz2
QS60Style does not show checkbox for checkable item in QTreeView
QS60Style currently skips drawing of checkbox for checkable itemviews. It however reserves space for the checkbox in the itemview item row. As a fix, also draw the checkbox. Task-number: QTBUG-11150 Reviewed-by: Shane Kearns
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qs60style.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index d529dd5..5996032 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -1475,8 +1475,8 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
const QIcon::State state = (voptAdj.state & State_Open) ? QIcon::On : QIcon::Off;
voptAdj.icon.paint(painter, iconRect, voptAdj.decorationAlignment, mode, state);
- // Draw selection check mark. Show check mark only in multi selection modes.
- if (itemView && !singleSelection) {
+ // Draw selection check mark or checkbox
+ if (itemView && (!singleSelection || (vopt->features & QStyleOptionViewItemV2::HasCheckIndicator))) {
const QRect selectionRect = subElementRect(SE_ItemViewItemCheckIndicator, &voptAdj, widget);
QStyleOptionViewItemV4 checkMarkOption(voptAdj);