[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Question for Qt experts about geometry management...
From: Carsten Pfeiffer <carpdjih () cetus ! zrz ! tu-berlin ! de>
Date: 2001-03-31 11:05:32
[Download RAW message or body]
Am Montag, 26. März 2001 05:24 schrieb Pascal A. Niklaus:
Hi,
> What I'd like to do is a geometry management that allows widgets (in a
> QFrame, managed by QGridLayout) to grow so that they fill a QScrollView
> horizontally (but don't get larger! There will therefore never be a
> horizontal scrollbar).
> However, the QFrame (in the QScrollView) should be allowed to grow higher
> (vertically larger) than the QScrollView... (there will then be a vertical
> scrollbar).
>
> Currently, the problem is:
> - if I don't use a QScrollView-derived widget, the stuff behaves exactly as
> I want, but there is of course no vertical scrollbar...
> - if I put everything in a QScrollView, the view expands horizontally to
> ca. 3x the width of the QScrollView, which is awkward...
>
> I was looking for some sizePolicy in the QGridLayout, but could not find
> what I needed. I also checked the sizeHint() of the individual widgets,
> but it is well below the width where there would be a need to expand
> everything horizontally to a size larger than the current QScrollViews
> width.
does it help if you call
frame->setFixedWidth( scrollView->viewport()->width() );
scrollview->setHScrollBarMode( QScrollView::AlwaysOff ); // maybe needed
Just make sure to always adjust the frame's width when the scrollview is
resized.
Cheers,
Carsten Pfeiffer
>> Visit http://master.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