Results 1 to 2 of 2

Thread: TreeView / WidgetView

  1. #1
    Join Date
    Jan 2008
    Location
    Germany
    Posts
    80
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default TreeView / WidgetView

    Hi,

    I have a conceptual question:

    I would like to create an application which layout could be somehow compared to the layout of iTunes: my main window is composed by a tree on the let side and by a widget (or a widget container) on the right side.

    By selecting an item on the tree I would like to display the widget corresponding to the item selected on the right side. Is is convenient for me to store the item attributes (name, associated widget,...) directly in the treeItem class.

    I was thinking to use a QSplitter between the tree and the widget to be displayed.
    With QSplitter I can add or insert a Widget but I cannot replace one (In my case I would like to replace the widget on the right size when a different item is selected on the tree).

    I was thinking to use a widget container on the right size of the splitter, but I am not sure what kind (if there is one) of Qt class could be used for this purpose.

    Alternativelly I was also thinking to use a QtabWidget on the right size of the splitter, in order to put event and add all possible widget as tabs, but this solution just felt not to be the correct one.

    If someone has an idea...

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: TreeView / WidgetView

    take a look at QStackedWidget.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Treeview with buttons
    By galactor88 in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2009, 08:55
  2. Problem with auto expand on treeview
    By piquadrat in forum Qt Programming
    Replies: 1
    Last Post: 26th April 2009, 11:21
  3. Replies: 10
    Last Post: 29th August 2008, 16:44
  4. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53
  5. TreeView click item not connecting
    By Big Duck in forum Qt Programming
    Replies: 2
    Last Post: 9th June 2006, 19:38

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.