Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Loop creation of widgets in a tablewidget?

$
0
0
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.

Viewing all articles
Browse latest Browse all 18427

Trending Articles