hiiii
i need to sort my table in ascendin order after adding a row to my table..
i wrote dis::
Code:
QPair<int,int> item ; item.first=phyaddr; item.second=y; memoryList.append(item); table->insertRow(table->rowCount()); table->setItem(row, 0, fir); table->setItem(row, 1, sec); table->sortItems(0,Qt::AscendingOrder );
i also tried dis while creating the table in addition to above code without the last line::
Code:
table->sortByColumn(0,Qt::AscendingOrder); table->setSortingEnabled(true);
bt the problem with dis is the addition of the row is not takin place correctly....
its adding first column to first row..n second col is remainin blank
the second col is changed in the last row...
thus a total mess...wat do i do..????