From d242d2f863936a4e3e2b07a4d84b7f0c4b4eb817 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 17 Sep 2010 15:12:12 +0300 Subject: 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 --- src/gui/styles/qs60style.cpp | 4 ++-- 1 file 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); -- cgit v0.12