From bd4f9c4bde970fb98f39623e4a81b4922fd8fb1a Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 28 May 2009 12:32:16 +0000 Subject: [PATCH] Fixing height of Object Browser Item --- src/SUIT/SUIT_TreeModel.cxx | 7 +++++++ src/SUIT/SUIT_TreeModel.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/SUIT/SUIT_TreeModel.cxx b/src/SUIT/SUIT_TreeModel.cxx index 718d42514..10ce1667e 100755 --- a/src/SUIT/SUIT_TreeModel.cxx +++ b/src/SUIT/SUIT_TreeModel.cxx @@ -1672,3 +1672,10 @@ void SUIT_ItemDelegate::paint( QPainter* painter, } QItemDelegate::paint( painter, opt, index ); } + +QSize SUIT_ItemDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const +{ + QSize size = QItemDelegate::sizeHint ( option, index ); + size.setHeight( size.height() + 1 ); + return size; +} diff --git a/src/SUIT/SUIT_TreeModel.h b/src/SUIT/SUIT_TreeModel.h index e35570342..5c1565ce6 100755 --- a/src/SUIT/SUIT_TreeModel.h +++ b/src/SUIT/SUIT_TreeModel.h @@ -248,6 +248,8 @@ public: virtual void paint( QPainter*, const QStyleOptionViewItem&, const QModelIndex& ) const; + + virtual QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const; }; #ifdef WIN32 -- 2.39.2