Qt 6.11 is out! See what's new in the release
blog
setRowStretch() dynamically change?
General and Desktop
4
Posts
2
Posters
1.4k
Views
2
Watching
-
Hi,
Can you share a sample code where you setup your QGridLayout and call setRowStretch ?
-
spacerItem = QSpacerItem(20,80,QSizePolicy.Minimum,QSizePolicy.Expanding)
n = self.grid.rowCount() + 1 self.grid.addItem(spacerItem, n, 1) self.grid.setRowStretch(n, n)Theoretically, everytime i call t his function, the last element will be stretched the most right?
-
It won't make the row itself bigger, it will allow it to grow more if needed.