Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6741

On Mac OS X platform the QMenuBar::triggered(QAction *) fires twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.5.3
    • Core: Event loop
    • None
    • Mac OS X Leopard (carbon)
    • macOS
    • 5339d24dc09525a67295adf98e9042971f4a9b2e

    Description

      Steps to reproduce / test case
      1. Connect the menubar's triggered(QAction *) signal to a slot.
      2. Click on the menu action
      3. The connected slot is called twice.

      Note: Problem does not occur on Windows Vista 64.

      MainWindow::MainWindow(QWidget *parent) 
      : QMainWindow(parent), ui(new Ui::MainWindow) 
      { 
          ui->setupUi(this); 
          connect(ui->menuBar, SIGNAL(triggered(QAction*)), this, SLOT(menuTriggerAction(QAction*))); 
      } 
      
      MainWindow::~MainWindow() 
      { 
         delete ui; 
      } 
      
      void MainWindow::menuTriggerAction(QAction * action) 
      { 
         fprintf(stdout, "Triggered action: %s\n", action->text().toStdString().c_str()); 
         fflush(stdout); 
      } 
      

      More information

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            pullatti Prasanth Ullattil
            isdale Keith Isdale (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes