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

Regression: Alt-key accelerators in QDialogButtonBox not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.9.0
    • Fix Version/s: 5.9.2
    • Labels:
      None
    • Environment:
      Qt 5.9 as supplied by openSUSE Tumbleweed, compiled with GCC 7.
    • Commits:
      184d80f5a0d6764745ab77487620eb41679226f0 (qtbase/5.9, 16.7.2017, 5.9.2)

      Description

      In Qt 5.9, Alt-key accelerators in QDialogButtonBox are currently not working. This was observed both in KDE Plasma's control modules but also in the minimal example shown below:

       

      #include <QApplication>
      #include <QDialog>
      #include <QDialogButtonBox>
      
      int main(int argc, char** argv)
      {
       QApplication app(argc, argv);
       QDialog* dlg = new QDialog;
       dlg->setMinimumWidth(200);
       QDialogButtonBox* box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Reset, Qt::Horizontal,   dlg);
       QDialogButtonBox::connect(box, &QDialogButtonBox::accepted, dlg, &QDialog::accept);
       dlg->show();
       return app.exec();
      }
      

       

      Steps to reproduce:

      1. Build and run the test
      2. Press the Alt key: Accelerators are shown under Reset and OK
      3. While pressing Alt, press "o"

      Expected result: Dialog closes

      Actual result: Nothing happens

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              broulik Kai Uwe Broulik
              Reporter:
              lbeltrame Luca Beltrame
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes