Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Is it nessesary to use a layout manager?



  • I whant to create this form:
    alt text

    For widget placement I use the setGeometry method:

    lablePortName->setGeometry(labelSize.width, labelSize.height, coord-X, coord-Y);
    

    Is it necessary to use a layout manager? I mean is the using of a layout manager can reduce number of code strings and/or time to develop such form without changing demands of this GUI?


  • Lifetime Qt Champion

    @flammmable said in Is it nessesary to use a layout manager?:

    Is it necessary to use a layout manager?

    Well, it's not. But why bother with manual positioning/sizing of all your widgets? And as soon as your window is resizable it gets even more cumbersome to do it manually.



  • @flammmable With the help of layout manager you can make resolution independent GUI applications.

    I mean is the using of a layout manager can reduce number of code strings and/or time to develop such form without changing demands of this GUI?
    

    yes.. by using layout manager manual code for positioning the widgets elements can be eliminated. code for resize of window to resize the elements also be eliminated.


Log in to reply