From 766551beb816e24cdfe326164a3b7b5377684a9c Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 13 Aug 2007 07:03:58 +0000 Subject: [PATCH] Background color must be transparent in all qView(TreeView, ListView,...) objects --- src/SUIT/SUIT_TreeModel.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SUIT/SUIT_TreeModel.cxx b/src/SUIT/SUIT_TreeModel.cxx index 72e78e36a..48f486896 100755 --- a/src/SUIT/SUIT_TreeModel.cxx +++ b/src/SUIT/SUIT_TreeModel.cxx @@ -536,6 +536,7 @@ QVariant SUIT_TreeModel::data( const QModelIndex& index, int role ) const c = obj->color( SUIT_DataObject::Background, index.column() ); if ( !c.isValid() ) // default value c = QApplication::palette().color( QPalette::Base ); + c.setAlpha( 0 ); val = c; break; case ForegroundRole: @@ -1367,8 +1368,11 @@ void SUIT_ItemDelegate::paint( QPainter* painter, // Note: we check into account only custom roles; other roles are process // correctly by the QItemDelegate class QVariant val = index.data( SUIT_TreeModel::BaseColorRole ); - if ( val.isValid() && val.value().isValid() ) + if ( val.isValid() && val.value().isValid() ) { + QColor aBase = val.value(); + aBase.setAlpha( 0 ); opt.palette.setBrush( QPalette::Base, val.value() ); + } val = index.data( SUIT_TreeModel::TextColorRole ); if ( val.isValid() && val.value().isValid() ) opt.palette.setBrush( QPalette::Text, val.value() ); -- 2.39.2