Hi,
I try to implement in ...\hbqt\tests\testbrow.prg the sorting of columns of an opened .dbf database.
I found that adding tb1:setSortingEnabled(.t.) the columns header display an arrow that change direction by clicking on it,
but, no data sorting happened.
I tried also to add tb1:sortByColumn( 0,0 ) to activate a sorting without clicking on the header, but without success either.
Am I doing something wrong, miss something or the :setSortingEnabled(.t.) is intended for ex. QTreeView or else.
Googling i found lot of conflicting opinions and cases from where QTableview doesn't do the sort of columns as a QT bug till the sorting is applied only to the data of the column that is sorted, not to the entire rows till that numbers are not sorted as they will have to be.
Can someone give some help about the sorting columns implementation in HBQT and not only in QTableView if it differs, or where can be found some explanation.
I looked in hbide the way of sorting the .dbf using the already made database index from where are retrieved the indexes.
That's ok, but that's not the idea.
I have some thoughts, if this can't be done using some qt methods, triggers, connections or else, as an idea, to make, in my case, a temporary .cdx index file that contains all fields orders and than trigger them when the header is pressed.
Large database - more time i know.
I use also a total commander plugin - cdbfview (it's free) and extremely fast. Among other things I can view the database and sort the columns easily, and what's very interesting i have found no temporary files during the sorting. Bad thing can't edit the fields but in lot of cases useful to get some informations quickly. Haven' found it's source code yet.
Thanks in advance for every opinion.
Zoran