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

Snap Mouse pointer to default button broken on Windows in Qt 5

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.2.0
    • 5.1.0
    • None
    • Windows 7
    • 1baf293548aa859e922dface4cd7b4bac5754b3c

    Description

      On Windows 7, in the mouse properties dialog, you can tick a checkbox to automatically move the mouse pointer to the default button in a dialog box (cf pic).

      The attached project is the MainWindow default project with a simple close event function :

       
      void MainWindow::closeEvent(QCloseEvent* event)
      {
          QMessageBox::StandardButton button = QMessageBox::question(this, "Quittez ?", "Voulez vous ?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
          if(button == QMessageBox::No) {
              event->ignore();
          }
      }
      

      This feature was working great on Qt 4.8 (tested with example attached) but is broken in Qt 5.1 at least (didn't check on Qt 5.0).

      Attachments

        1. Mouse-Properties-Windows-7.png
          34 kB
          Jonathan Courtois
        2. SnapMouseDefaultButton.zip
          1 kB
          Jonathan Courtois
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            andysh Andy Shaw
            johnlamericain Jonathan Courtois
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes