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

submenu with accelerator render bug

    XMLWordPrintable

Details

    Description

      Having a submenu in a menubar that has an accelerator renders with the menu indicator on top of the the shortcut.

      To reproduce

      run this example
      open menu
      notice that the little triangle on top of the accelerator.

      #include <QtGui>

      class MainWindow : public QMainWindow
      {
      Q_OBJECT
      public:
      MainWindow(QWidget *parent = 0)
      : QMainWindow(parent)

      { setCentralWidget(new QTextEdit(this)); QMenu *menu = menuBar()->addMenu(tr("&File")); menu->addAction("bar"); QMenu *m = menu->addMenu(style()->standardIcon(QStyle::SP_ArrowBack), "foo"); m->menuAction()->setShortcut(Qt::ControlModifier + Qt::Key_M); m->addAction("foo"); }

      public slots:
      };

      #include "main.moc"

      int main(int argc, char **argv)
      {
      QApplication a(argc, argv);
      MainWindow w;
      w.show();
      return a.exec();
      }

      Attachments

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

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            rve Anders Bakken
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes