Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Automatic layout for Qt GUIs
The automatic layout for GUI elements is the research topic we are addressing now.
It is a process in which the widgets composing a GUI are automatically arranged depending on the relationships between them, and on the features of the container dialog. Initial widgets' layout (if exist) is broken, and a new QAutomaticLayout is added in order to arrange all the elements in a container/dialog/window. The arrangement process is level-based (a container widget represents a new level).
Please, send me your impressions, suggestions, likes, dislikes, etc. We would like to improve the prototype and, as the rest of our work, release it as an open-source contribution.
leinir last edited by
That looks quite interesting, i must say! Seeing this all opensourced would be a great addition, methinks :) Calling it a QAutomaticLayout seems a little fun, mind, as the Q classes tend to indicate something which lives inside the Qt framework itself... So one small suggestion would be that, to avoid confusion, it might be worth it to not call your class that - an example of that approach is KDAB's widgets, such as KDChart :)
DenisKormalev last edited by
Looks interesting, but I failed to find info about project at your website.
alexander last edited by
It's interesting, can we see this prototype code?
Sorry Denis, but these results are very recent, so we have not yet created any documentation. We would like to write something to present all the details of this solution.
Alexander, we are finishing this first prototype. Note that the video was recorded this morning, so it shows the first results we obtained. There is a lot of remaining work, but we will try to share the code as soon as possible.
Our idea is to improve it as much as possible, and implement it to allow developers to choose (and also implement) among several arrangement strategies.
I will send a new post when any documentation and/or the code are available.
Thanks a lot for your comments!!
DenisKormalev last edited by
pedromateo, ok, I will wait for your next post :)
What about licenses? Will it be under lgpl?
[quote author="Denis Kormalev" date="1291232855"]pedromateo, ok, I will wait for your next post :)
What about licenses? Will it be under lgpl?[/quote]
all of our work is released under the lgpl license, because one of the principles underlying our organization is to share our results in order to obtain feedback from the community.
However, another of our goals is writing papers. So, I do not know if I can free the details of this design before the paper is written.
Nevertheles, if I can, I will post some process details or pieces of code for people to give me some feedback and try to improve this solution. Thus don't worry, I will free this code as soon as I can.
milot.shala last edited by
Great work Pedro!
As everyone else here in the forums, I like to see code, so I guess we should wait for that :)
Now I am working on improving the arrangement strategy to support some "extreme" cases in which the elements of the initial GUI are very very misplaced.
I think that a GUI in which the elements are distributed like a square, that is, all the widgets are distributed all over the available space (please, see the video above), it seems the GUI is better arranged because, if for example we divide the GUI space into 4 similar sub-squares, all of them have a similar "weight".
However, GUIs can be composed of a very heterogeneous group of elements, so I think trying to get always a square shape could be "dangerous".
What do you think about this?
Thnaks, and Regards
andre last edited by
Could you explain how the relationships between the elements are defined? The video does not show that.
[quote author="Andre" date="1295001044"]Could you explain how the relationships between the elements are defined? The video does not show that.[/quote]
now I can't give you details about how the relatinships between widgets are defined. We are wondering whether to create a new paper an then an open-source contribution related to this idea.
However, I can say you that the position of each widget is compared to the position of closer widgets, and then is ordered according to its position inside the container which is holding it.
I will provide you with further details ass soon as I can.