I want to sort the column data in the table but the data is in string format and I want to do in Integer format.
ID = 0;
ui->tableWidget->setItem( CurRow,12 ,tbl_item12 );
ui->tableWidget->sortByColumn(12,Qt::DescendingOrder);
but I get error on shorting Integer
ID = 0;
tbl_item12 = new QTableWidgetItem (QTableWidgetItem (QString::number(ID)));
ui->tableWidget->setItem( CurRow,12 ,tbl_item12 );
ui->tableWidget->sortByColumn(12,Qt::DescendingOrder);
but I get error on shorting Integer
tbl_item13 = new QTableWidgetItem (QTableWidgetItem (ID));
To copy to clipboard, switch view to plain text mode
Can anyone help me to insert the integer value in column and sort it?
If possible send me the snippets of the code.
Bookmarks