[Qt-interest] show/hide top level items in tree view

Harish Surana surana4u at gmail.com
Wed Mar 23 08:34:58 CET 2011


Thanks André! Google shows that someone has already worked on this
problem(http://developer.qt.nokia.com/faq/answer/how_can_i_implement_my_own_proxy_model_that_is_more_advanced_than_just_sort)
. But there seems to be some problem. it only shows first top level
item's child. But all other things are fine. I will take a hint from
it. :)

On Wed, Mar 23, 2011 at 12:28 PM, Andre Somers <andre at familiesomers.nl> wrote:
> Op 23-3-2011 7:21, Harish Surana schreef:
>> Hi All,
>>
>> I want to show/hide top level items from tree view. I mean when i
>> press hide children should become top level items and when i press
>> show it comes back to normal form.
> That is nice. I assume now your question is: "how do I achieve that?"
>
> What I would do, is build a custom proxy model that does that for you.
> You might be able to use QSortFilterProxyModel as a baseclass.
>
> André
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>



More information about the Qt-interest-old mailing list