Results 1 to 4 of 4

Thread: How to determine which tab is selected from QTabWidget

  1. #1
    Join Date
    Nov 2012
    Posts
    23
    Thanks
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60

    Default How to determine which tab is selected from QTabWidget

    I have 4 tabs in a QTabWIdget, I want to be notified each time I switch a tab.
    I have to perform certain condition check with each tab switch, such as I can perform certain function if tab1 is selected and same for all four tabs.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: How to determine which tab is selected from QTabWidget

    Use can use this signal
    Qt Code:
    1. void QTabWidget::currentChanged ( int index ) [signal]
    To copy to clipboard, switch view to plain text mode 
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

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

    sargeslash (18th January 2013)

  4. #3
    Join Date
    Nov 2012
    Posts
    23
    Thanks
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60

    Default Re: How to determine which tab is selected from QTabWidget

    Yes thanks a lot, but I feel stupid now for posting here before searching a bit, I actually found the solution
    Any how thanks for the reply

  5. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: How to determine which tab is selected from QTabWidget

    I will say one won't even need to search for such simple things. They can be found stright away in Qt Documentation.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. Replies: 6
    Last Post: 21st August 2013, 12:53
  2. Determine the Process ID
    By Jimmy2775 in forum General Programming
    Replies: 5
    Last Post: 7th October 2011, 09:16
  3. Replies: 2
    Last Post: 11th January 2010, 23:15
  4. How to determine available memory
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2007, 00:00
  5. How to determine if my app is active...
    By Ben.Hines in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 16:02

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.