Results 1 to 4 of 4

Thread: QTreeWidget and QStackWidget

  1. #1
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Smile QTreeWidget and QStackWidget

    Hi,

    I used Qtdesigner and put a QtreeWidget with several items, each on containing its subitems, and a QStackedWidget with several pages. What i need is to connect the clicked () action on the QTreeWidgetItem and then, make the correct page appear on the QSTackWidget. I tried to read the QTreeWidget doc, but i couldnt figure out how.
    There's also this post http://www.qtcentre.org/threads/3721...d-QStackWidget, but it doesnt say much.

    Thanks in advance for any help.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

  3. The following user says thank you to tbscope for this useful post:

    Paulo Fernando Pimenta (1st March 2011)

  4. #3
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

  5. #4
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTreeWidget and QStackWidget

    You can set for each QTreeWidgetItem a customData with QTreeWidgetItem::setData (an index or a pointer to page) and use it in slot
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Sample code to use QTreeWidget and QStackWidget
    By Jeff100 in forum Qt Programming
    Replies: 1
    Last Post: 22nd December 2010, 08:05
  2. ShowFullScreen on QStackWidget don't work
    By Ratheendrans in forum Qt Programming
    Replies: 2
    Last Post: 10th May 2010, 18:34
  3. QStackWidget layoutspacing
    By killerwookie99 in forum Qt Programming
    Replies: 2
    Last Post: 14th August 2008, 21:38
  4. Replies: 2
    Last Post: 17th March 2008, 12:53
  5. Reuse a Qwidget with a QStackWidget
    By ucomesdag in forum Qt Programming
    Replies: 4
    Last Post: 25th April 2007, 02:47

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.