Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error with QTabWidget and apple magic mouse

Error with QTabWidget and apple magic mouse

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srivatsanv
    wrote on last edited by
    #1

    On Mac (am running 10.9.3), QTabWidget emits currentChanged(int) signal more than once when a tab is simply clicked with the magic mouse. It does not happen always, but this happens consistently. My QTabWidget had 6 tabs and when the app is minimized and gets focus back and on clicking the tabs, you would see the effect of fingers on a piano. Wrong tabs get activated and you can see multiple currentChanged signal being emitted for just a simple click.

    QTabWidget *tabWidget;
    connect(tabWidget,signal(currentChanged(int), this,SLOT(TabWidgetCurrentChanged(int)));

    ...

    void MainWindow::TabWidgetCurrentChanged(int index)
    {
    qDebug() << "TabWidgetCurrentChanged = " << index;
    }

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You should also add which version of Qt and Xcode you are using.

      Can you reproduce this with a minimal example ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        srivatsanv
        wrote on last edited by
        #3

        Thanks for the reply. I use XCode 5.1.1 and Qt 4.8.5

        The example http://qt-project.org/doc/qt-4.8/dialogs-tabdialog.html is sufficient to reproduce this effect. This has no slot connected to currentChanged(int) signal, but I connected that just to receive the bogus signals,

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Since you are running Mavericks you should use Qt 4.8.6. It's the first version that officially supports 10.9

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved