Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, March 2008
Sorting a table


Message 1 in thread

Thank you for reading this.

I'm attempting to sort the contents of a  table. The following code must be
close but not correct.

Clicking on the header of the first column (this is the column I want to sort)
connects to the sortSlot function. The first click sorts the column correctly
but does not move the rows to match. A second click, still on the header of the
first column, moves all of the rows except the first column.

I've read the documentation and studied the examples but I cannot see the
answer. By the way, I'm using QT 3.3.8.

void Configuration::sortSlot(int col)
{
    dataBaseTable->sortColumn(col, TRUE, TRUE);
}

Regards,
Phil. 

--
 [ signature omitted ]