hi..
I'm starting with Qt
I don't know how can I fil a TableWidget with values.
Can u help me?
thanks....
Printable View
hi..
I'm starting with Qt
I don't know how can I fil a TableWidget with values.
Can u help me?
thanks....
As the documentation states:
Quote:
Items are created ouside the table (with no parent widget) and inserted into the table with setItem():
Code:
(row+1)*(column+1))); tableWidget->setItem(row, column, newItem);
First you have to specify how many rows and columns should the table have using setRowCount() and setColumnCount().
Example:
Code:
tableWidget->setRowCount(10); tableWidget->setColumnCount(3); for(int row = 0; row < 10; row++) { for(int column = 0; column < 3; column++) { tableWidget->setItem(row, column, item); } }