Restricted Layout for Qt GUI applications
-
wrote on 23 Dec 2010, 18:25 last edited by
Hi again!!!
Restricted Layout is a GridLayout in which the internal widgets meet a set of size requirements. When some widgets can not be shown due to size restrictions, two flow-control buttons appear to allow us to show hidden ones. Those size requirements can be changed in runtime.
You can see it working here: "http://www.youtube.com/watch?v=VfM6HpHy6X4":http://www.youtube.com/watch?v=VfM6HpHy6X4
This layout could be very useful in scenarios in which a set of panels are shown, but there are some size restrictions to be met in order to ensure visualization quality (usually a minimum width and height values).
Comments, suggestions, and impressions are welcome.
Enjoy it!!! -
wrote on 23 Dec 2010, 18:29 last edited by
video is missing... :(
-
wrote on 23 Dec 2010, 18:48 last edited by
[quote author="paulo" date="1293128940"]video is missing... :([/quote]
Now it is available (it was just uploaded in YouTube ;-)
-
wrote on 23 Dec 2010, 18:55 last edited by
great, nice work
-
wrote on 23 Dec 2010, 19:02 last edited by
good demo.
-
wrote on 23 Dec 2010, 19:10 last edited by
Yes, it is really interesting, I already think about how I could utilize such a feature.
-
wrote on 24 Dec 2010, 21:30 last edited by
Good job!
When can we expect the release of both QAutomaticLayout and Restricted Layouts?
-
wrote on 24 Dec 2010, 23:24 last edited by
Wow Great work, Can we have some src code of it? I am specially interested modifying size at run time
-
wrote on 3 Jan 2011, 11:35 last edited by
[quote author="Immii" date="1293233099"]Wow Great work, Can we have some src code of it? I am specially interested modifying size at run time[/quote]
Hi Immii!!!
I can not release the source code yet, but let me give you some advices:
- you can use a QGridLayout with a fixed size. It is the container in which include your widgets.
- use a collection of widgets: for the widgets you can show, visible = true, and visible = false for the opposite situation.
- distribute the visible widgets along the slots in the layout
Cheers!!!
-
wrote on 14 Jan 2011, 10:23 last edited by
Nice demo. I like it. I am not sure I like the bottons above and under the view that much though. Is that hard-coded?
-
wrote on 21 Jan 2011, 12:27 last edited by
[quote author="Andre" date="1295000613"]Nice demo. I like it. I am not sure I like the bottons above and under the view that much though. Is that hard-coded? [/quote]
Hi Andre,
those buttons are automatically shown when some QWidget included into the RestrictedLayout have to be hidden because size restrictions are not met.
Could you suggest me other way to provide access to hidden components? It would be very helpful for me.
Thank you very much for your valuable feedback.
-
wrote on 21 Jan 2011, 13:08 last edited by
The best way to do that, would be application dependant, I think. For one application, the best solution could be to provice previous and next buttons under the layout you show. For others, gestures may be appropriate, and in the next one, you'd like to have scroll bars.
In short, I think there should be API to enable custom navigation of the restricted layout. That way, users can make up their own mind on what means of navigation suits their application.