10-20-2012 11:41 PM
I have a QVariantMap as shown below:
firstname = ""
lastname = ""
employee number = ""
jobtitle = ""
salary = ""
I can sort the header by the employee number rather easily but Im having trouble including all of the other information. This is done all via C++.
Is there a way to set an element in the map (such as the job title) in the description and put the salary on the right side of the element?
Solved! Go to Solution.
10-21-2012 03:49 AM
For the sorting part, you want to do something like this:
dataModel.setSortingKeys(QStringList() << "employee number" << "lastname" << "firstname");
For the rest of it, I've only actually setup ListViews using StandardListItem from the QML side of things. Over there, you just bind its properties to the various keys from your map. Not sure offhand how to do the equivalent in C++, since I've only done pure-C++ ListView setups when using entirely custom list item controls.
10-22-2012 12:04 PM
Yes your right, to see the C++ implementation check out the cascades cookbook sample app!