[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] The order of items in QListView
From:       Boudewijn Rempt <boud () rempt ! xs4all ! nl>
Date:       2001-05-31 7:27:01
[Download RAW message or body]

On Wednesday 30 May 2001 09:08, you wrote:
> When I use QListViewItem, I got an unexpected result.
> Here is a simple sample code. In this sample,
> the order of items which I add is 'Europe', 'Asia'.
> But I got the order of items which is 'Asia', 'Europe'.
>
>

Not really unexpected: unless you explicitly tell the listview
or listviewitem after which item the new item should be placed,
it's placed first. Its the difference between

QListViewItem ( QListView * parent ) 
QListViewItem ( QListViewItem * parent ) 

and

QListViewItem ( QListView * parent, QListViewItem * after ) 
QListViewItem ( QListViewItem * parent, QListViewItem * after ) 

If you want to always insert your item as the last item in 
a branch, you'll have to keep track of which item is the
previous last.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic