sean at seanfisk.com
Wed Jul 3 17:24:04 CEST 2013
Nice, Eric and Matt; didn't know about setData().
On Wed, Jul 3, 2013 at 8:53 AM, Matthew Woehlke <matthew.woehlke at kitware.com>
On 2013-07-03 02:43, Sean Fisk wrote:
> > Unfortunately, the QListWidget sorting algorithm sorts
> > lexicographically, not numerically.
> IIRC it sorts by item data with some 'magic' depending on the data type.
> At least I am pretty sure I've written lists with the built-in sorting
> and gotten numeric sort.
> Try instead of setText, setData(Qt.DisplayRole), and make sure the data
> you give is an int and not a string.
> PySide mailing list
> PySide at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PySide