You have two different ways to approach the problem:
1) Qt widgets
Use QPushButton creation within a loop with the desired iteration count.
QVector<QPushButton> pushButtons1(25);
foreach (QPushButton &pushButton, pushButtons1)
pushButton.setText("pushButtons1");
QVector<QPushButton> pushButtons2(64);
foreach (QPushButton &pushButton, pushButtons2)
pushButton.setText("pushButtons2");
QVector<QPushButton> pushButtons2(144);
foreach (QPushButton &pushButton, pushButtons3)
pushButton.setText("pushButtons3");
It is difficult to give any more concrete details without knowing more about your context and ues case.
2) QtQuickControls
Use the Button component with Repeater and/or Grid depending on your exact desire about the layout.
import QtQuick 2.0
Row {
Repeater {
model: 25
Button {
text: "foo1"
}
}
}
Row {
Repeater {
model: 44
Button {
text: "foo2"
}
}
}
Row {
Repeater {
model: 144
Button {
text: "foo3"
}
}
}