Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between GridLayout and Grid

What is the point of having a GridLayout component, when there is a Grid component? From what I can tell, they seem to be doing the same thing.

  • Grid: https://doc.qt.io/qt-5/qml-qtquick-grid.html
  • GridLayout: https://doc.qt.io/qt-5/qml-qtquick-layouts-gridlayout.html
like image 576
bobbaluba Avatar asked Mar 18 '14 11:03

bobbaluba


1 Answers

The components from the Layout module added in Qt 5.1 allow you for example to automatically resize your layout dynamically so if the user is able to resize the Window containing the given Layout it will grow/shrink properly. It also allows you to have certain elements fill the rest of the space in your Layout while others have fixed size.

You can read a bit more about Layout in the documentation and also see there is also RowLayout and ColumnLayout

like image 186
koopajah Avatar answered Sep 28 '22 08:09

koopajah