I have a very basic doubt regarding QGridLayout
.
For adding a widget in QGridLayout
we give QWidget *
that should be added along with the row
& column
no (some other args as well).
Now for removing a widget there is no function to remove a widget according to row & column no i.e. something like this:
int row, column;
gridObj->remove(row, column);
I think QGridLayout
must be maintaining a sort of QList
to store references of Widgets & there positions. So why is there no function for removing widgets by position only?
It only has 1 remove function for which we need to specify the reference of QWidget
object.
If this is a limitation somehow then is there a workaround for this problem? Maintaining a QList by myself is a solution but it is pretty tedious. Thank You