[Kde-pim] Re: State of KReparentingProxymodel
Stephen Kelly
steveire at gmail.com
Sat Dec 18 13:39:37 GMT 2010
Christian Mollekopf wrote:
>> >
>> > Testcase, specified parents, proxmodeltestapp:
>> > [1, 2],
>> > [1, 2,3],
>> > [1, 2, 4],
>> > [1, 5],
>> > [1, 2, 6],
>> >
>> > which should add 6 in tree below 2 (just after 4),
>> > but instead adds it to 1 (after 5).
>>
Hi,
I've just tried this, and what you described is not a bug in the proxy.
The KReparentingProxyModel does not sort. It does not move elements up and
down (visually).
You have a source model like this:
- 1
- 2
- 3
- 4
- 5
- 6
And you want the proxy to look like this:
- 1
- - 2
- - - 3
- - - 4
- - - 6
- - 5
Instead you're seeing this:
- 1
- - 2
- - - 3
- - - 4
- - 5
- - 6
To acheive what you want you need to first use a QSortFilterProxyModel to
create this:
- 1
- 2
- 3
- 4
- 6
- 5
You will then be able to make it into the structure you want.
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list