Hello all.
I think my problem is quite complex.
My program saves history of the actions the user did. I like the way it does this, and I wouldn't like to change it, actually.
The problem is that it takes some filenames from a directory named, e.g.
Wednesday 03.16.2011 and simply adds them to a treewidget.
Unfortunately, it adds them in random order, but, what I want is e.g.
the Tuesday 03.01.2011 to be 1st, then Thursday 03.03.2011 to be second and Sunday 03.20.2011 to be third.
I have to mention that only the days do count, because I make another parent for another month. So, actually, I have to compare the value between the two dots (03.01.2011) and then do a binary search and figure out how to make the list as I want and then add to the treewidget....
How can I extract the value I want ?
I'm thinking making a float a[31]; and adding there as I wish the values I want, but even if I have the values in there as I want e.g.
a[1]=01
a[2]=05
a[3]=13
a[4]=26 etc
How can I now which values matches with each item in order to place them correctly?
Bookmarks