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

Regression: Alt-key accelerators in QDialogButtonBox not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.9.0
    • None
    • Qt 5.9 as supplied by openSUSE Tumbleweed, compiled with GCC 7.
    • 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

              broulik Kai Uwe Broulik
              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