Results 1 to 2 of 2

Thread: Sample code to use QTreeWidget and QStackWidget

  1. #1

    Default Sample code to use QTreeWidget and QStackWidget

    Hello,

    Could anyone show a sample code to use QTreeWidget and QStackWidget, or pointer a link which use such a combination. Basically when a QTreeWidgetItem in a QtreeWdiget is clicked in the left side, a coressponding QStackWidget will be shown on the right. Thanks.
    Last edited by Jeff100; 22nd December 2010 at 04:54.

  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

    Default Re: Sample code to use QTreeWidget and QStackWidget

    Create a slot connected to the QTreeWidget::itemClicked signal.
    In that slot, do your own checking if necessary and call the QStackedWidget::setIndex slot.

Similar Threads

  1. QUdpSocket sample code
    By alimooghashang in forum Qt Programming
    Replies: 3
    Last Post: 14th November 2013, 20:59
  2. ShowFullScreen on QStackWidget don't work
    By Ratheendrans in forum Qt Programming
    Replies: 2
    Last Post: 10th May 2010, 18:34
  3. can't select item in a QTreeWidget via code
    By zack in forum Qt Programming
    Replies: 1
    Last Post: 14th July 2009, 20:31
  4. QStackWidget layoutspacing
    By killerwookie99 in forum Qt Programming
    Replies: 2
    Last Post: 14th August 2008, 21:38
  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.