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

Cocoa: No context menu events on a unified toolbar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • Some future release
    • 4.7.0
    • Widgets: Main Window
    • None
    • Tested on 10.6

    Description

      #include <QtGui>
      
      class MyToolBar : public QToolBar
      {
      public:
          MyToolBar ( QWidget * parent = 0 ) : QToolBar(parent)
          {
          }
      
          void contextMenuEvent ( QContextMenuEvent * event )
          {
              qDebug() << "contextMenuEvent found in MyToolBar";
          }
      };
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QMainWindow win;
          MyToolBar *myToolbar = new MyToolBar(&win);
          myToolbar->addAction("one");
          myToolbar->addAction("two");
          win.addToolBar(myToolbar);
      
          win.setUnifiedTitleAndToolBarOnMac(true);
          win.show();
      
          return app.exec();
      }
      

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            dettman Dean Dettman (Inactive)
            Votes:
            10 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes