How should one use the panels?


14-03-2010 13:04:35

I am trying to create a window so that the contents inside the window can "scroll" with a scrollbar if the user resizes the window to a small size. I managed to create the window and add contents to it programmatically however when I resize my window the content gets "clipped". I assume one should use the ScrollView widget or some sort of panel but I have no idea how to use it. Any help would be much appreciated.


14-03-2010 13:43:58

I just got the above working by setting

view->setCanvasSize(1000, 1000);

However with the Layout Editor this seems to be buggy. Every time I a run "test" in the Layout Editor, my ScrollView's position and size changes. When I return from the "test" the properties has changed to values I did not entered originally.


14-03-2010 13:56:05

Well, it works fine. Here's steps that you should do:
- create window with ScrollView inside;
- set Stretch Align to ScrollView;
- set CanvasSize property to something like 1000 1000 (or, for example set it same as current ScrollView size);
- create child widgets in ScrollView.
Works fine.