[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    very frustrated with sizehint of KViewList/QViewList KTextEdit/QTextEdit
From:       Willy De la Court <Willy.DelaCourt () pandora ! be>
Date:       2003-02-25 19:00:54
[Download RAW message or body]

hi all,

i'm getting ver frustrated with some layout problems i'v been chasing for a
day now.

i'm using Qt Designer the UI file is attached

i have placed a ListView at the top then some buttons below and then an
TextEdit box below. The problem i'm having is that the ListView and TextEdit
are taking too much space vertically and i can't resize it lower i'v been
looking at the source of QScrollview which is used in both and the sizeHint
does the following

QSize QScrollView::sizeHint() const
{
    if ( d->use_cached_size_hint && d->cachedSizeHint.isValid() )
        return d->cachedSizeHint;

    int h = fontMetrics().height();
    if ( h < 10 )
        h = 10;
    int f = 2 * frameWidth();
    return QSize( (12 * h) + f, (8 * h) + f );
}

if i understand this correctly it sets the height of the widget to 8 times
 the height of the font in it. so the minimum height of this thing is 8
LINES???????

the sizehint of QListView is even stranger

The point is what can i do about this or what am i doing wrong i'v seen
KListView with only 2 or 3 lines maximum but i can't seem to figure out how
to do that.

--
Simple things make people happy.
Willy De la Court

-------------------------------------------------------



-- 
Simple things make people happy.
Willy De la Court


["rangesitem_ui.ui" (application/x-designer)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic