Results 1 to 2 of 2

Thread: QTabWidget currentChanged signal for repeated selects of a tab

  1. #1

    Default QTabWidget currentChanged signal for repeated selects of a tab

    Hi

    I am using a QTabWidget. And when a tab is selected the currentChanged signal is emitted. Now if the user clicks the current tab again for the second time, the currentChanged signal is not emitted. And from then on, any number of clicks to the current tab is not emitting currentChanged signal.

    My application has a logic where the tab contents will be different for the first time user clicks the tab and the second time the user clicks the same tab.

    I would like to know how to activate this signal to be emitted everytime a user clicks the same tab.

    Thanks and regards,
    B

  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: QTabWidget currentChanged signal for repeated selects of a tab

    It's a good thing that QTabWidget and QTabBar can't do this.
    This is a UI nightmare.

    But, if you insist on doing this, you can always subclass QTabWidget and create a tabClicked signal.

    The correct solution is to use another kind of widget inside the tab to do what you want.
    A stacked widget together with buttons or a list widget, another tab widget, ...

Similar Threads

  1. QTabWidget currentChanged signal
    By vkincaid in forum Qt Programming
    Replies: 4
    Last Post: 9th December 2009, 18:07
  2. Replies: 1
    Last Post: 3rd August 2009, 12:44
  3. Replies: 1
    Last Post: 29th April 2008, 12:12
  4. no such signal QListBox::currentChanged()
    By jopie bakker in forum Newbie
    Replies: 2
    Last Post: 2nd March 2006, 15:17
  5. QTabWidget SIGNAL currentChanged()
    By campana in forum Qt Programming
    Replies: 3
    Last Post: 28th February 2006, 10:09

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.