Results 1 to 2 of 2

Thread: Hide qtreewidgetitem root

  1. #1
    Join Date
    Mar 2008
    Posts
    15

    Post Hide qtreewidgetitem root

    Hi all
    Is it possible somehow to hide root qtreewidgetitem, but not it's children?
    For instance:
    Qt Code:
    1. root1
    2. |
    3. --root2
    4. |
    5. ---child1
    6. ---child2
    To copy to clipboard, switch view to plain text mode 

    I want to hide root2, but child1 and child2 must stay visible.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Hide qtreewidgetitem root

    With QTreeWidget it is not possible without removing root2 item from the tree. You may use QTreeView and apply a proxy on the model to hide the item and move its children upwards in the hierarchy.

Similar Threads

  1. Qt 4.2.2 and SuSE Linux 9.3
    By Teuniz in forum Installation and Deployment
    Replies: 15
    Last Post: 26th February 2007, 12:21
  2. 4.1.4 built from source, qmake fails with Hello World
    By Mookie in forum Installation and Deployment
    Replies: 6
    Last Post: 27th June 2006, 23:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.