From this code, I want to create a table of buttons followed by input (row, column).
But my GUI doesn't show the buttons in 2x4, it shows them in 1x8.
QHBoxLayout* hl = new QHBoxLayout;
QVBoxLayout* vl = new QVBoxLayout;
for(int i=0; i<4; i++){
for(int j=0; j<2; j++){
btn_list.append(new QPushButton(this));
hl->addWidget(btn_list[(i*2)+j]);
}
vl->addLayout(hl);
}
this->setLayout(vl);