From: nds Date: Mon, 13 Aug 2007 07:03:58 +0000 (+0000) Subject: Background color must be transparent in all qView(TreeView, ListView,...) objects X-Git-Tag: qt4_porting_delivery_220807~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=766551beb816e24cdfe326164a3b7b5377684a9c;p=modules%2Fgui.git Background color must be transparent in all qView(TreeView, ListView,...) objects --- 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() );