Results 1 to 6 of 6

Thread: QTreeWidget and QStackedWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Mar 2009
    Location
    Belchatow, Poland
    Posts
    38
    Qt products
    Qt4
    Platforms
    Windows Symbian S60
    Thanks
    11
    Thanked 4 Times in 4 Posts

    Default Re: QTreeWidget and QStackedWidget

    It's not the best solution, but I think it's the fastest: create a hidden column in which you store index of QStackedWiget's page that is associated with the item. This way you can do this in 1 line (in tree's currentItemChanged slot):
    Qt Code:
    1. ui->stackedWidget->setCurrentIndex(current->text(1).toInt());
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to arturo182 for this useful post:

    Kill3rReaper (23rd October 2011)

Similar Threads

  1. QStackedLayout / QStackedWidget
    By morraine in forum Newbie
    Replies: 15
    Last Post: 12th July 2013, 09:16
  2. QStackedWidget
    By sattu in forum Qt Programming
    Replies: 6
    Last Post: 28th September 2011, 13:44
  3. QTableWidget along with QStackedWidget
    By smiling in forum Qt Programming
    Replies: 5
    Last Post: 13th March 2010, 12:46
  4. Help with QStackedWidget
    By onírico in forum Newbie
    Replies: 6
    Last Post: 12th November 2009, 16:34
  5. QSplitter and QStackedWidget
    By nikita in forum Qt Programming
    Replies: 4
    Last Post: 15th November 2006, 04:52

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.