[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: How to have a proper default layout with QSplitter
From: Arnold Krille <kde () arnoldarts ! de>
Date: 2009-04-25 19:03:37
Message-ID: 200904252103.42792.kde () arnoldarts ! de
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Saturday 25 April 2009 18:05:06 Andreas Pakulat wrote:
> I need some advice from layout experts. I've got a QSplitter here, with
> a filled treeview on the left part and a basically empty QWidget on the
> right part. But I can't get a proper initial sizement of these two, the
> treeview always takes the whole horizontal space. This results in nasty
> resizes of the dialog and movement of the splitter once there's a real
> widget put onto the left side.
> Anybody an idea how to get the treeview to not grow bigger than about
> 2/5th of the whole width by default?
Make both widgets sizePolicy MinimumExanding (or Expanding), give the
treewidget a horizontalStretch of 2 and the other widget a stretch of 3.
You can also set a maximumWidth for the treeview this is kind of bad gui
design because it might break with different fontsizes and screen
resolutions...
But it never hurts to give the treeview a minimum size.
Have fun,
Arnold
["signature.asc" (application/pgp-signature)]
>> 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