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

Support for mnemonic shortcuts for QML Button

    XMLWordPrintable

Details

    Description

      Using an ambersand with QPushButton creates automatically a shortcut, for example

      QPushButton *button = new QPushButton("&Press Me", this);
      

      creates a shortcut for ALT + P. The same thing does not work with QML Buttons, for example

      Button {
          text: qsTr("&Press Me")
      }
      

      This adds the underscore to the "P" but there is no shortcut for it. Would it be possible to add similar automatic shortcut in QML as it is with QWidgets?

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            pekarjal Pekka Karjalainen
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes