Hi, I’ve got 64 rows and 3 columns in a QTableWidget. I’m trying to add QComboBoxes to all of the 64 rows (in the third column). Here’s my code for 1 row:
QComboBox *tablecombo1 = new QComboBox();
ui->tableWidget->setCellWidget(1,3,tablecombo1);
It works fine. But how can I loop this code, so that in all of the 64 rows are these ComboBoxes inserted (difficult to explain with my English)? I don’t want to copy, paste and edit this 64 times.
↧