|
|
Hi,
ok, that is working. but when I add a QListViewItem to my QListView
(one column) with insertItem() the new item is added on top. How can I
add it to the bottom ?
(I've done setSorting(-1, false); to avoid sorting, but it's not helping)
2006/5/25, Philippe Poelvoorde <pooly7@xxxxxxxxx>:
Hi,
2006/5/25, André Somers <andre@xxxxxxxxx>:
> Philippe Poelvoorde wrote:
>
> > I use a QListView to display several rows which describe products
> > (there is only one column, but up to 5000 rows). When the user
> > double-click, I need to retrieve the line number where he has clicked.
> > How could I do that ?
> What I do is create my own subclass of QListViewItem, and add the additional
> data property (-s) I need. Use these object for your QListView, and you'll
> have direct access to the data you're after. If that is really the line
> number, just store an int. If you were actually using that number to store
> somthing else in a list, you might use a pointer directly.
I've check a bit further the doc, and I'm afraid I'll have to go this
way it seems. Thanks for the tip !
--
http://www.w-fenec.org/
--
--
http://www.w-fenec.org/
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/
|
|