[PySide] Qinputdialog
Sean Fisk
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>
wrote:
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.
>
> --
> Matthew
>
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside
>
--
Sean Fisk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130703/65ed2d88/attachment.html>
More information about the PySide
mailing list