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

Improve documentation for QML Shortcut's sequence property

    XMLWordPrintable

Details

    • All
    • 5c402af75 (dev), 3f9478ca2 (6.5), 4fd085545 (6.6), fea552c9b (dev), 5fe25ef5b (6.5), 98830caf8 (6.6)
    • DaVinci 85

    Description

      When using a standard key for Shortcut's sequence property, I found that if the key resolves to multiple sequences, we get this warning and only the first sequence gets assigned to the shortcut:

      QML Shortcut: Shortcut: Only binding to one of multiple key bindings associated with 15. Use 'sequences: [ <key> ]' to bind to all of them.

      And as the message says, we have to use the sequences property instead, assigning it a single-element array.

      As this can result in very nasty bugs, I think the documentation should say something about it. Maybe even emphasize that using sequence is not a reliable way to assign standard keys to shortcuts (you may not know if, depending on the platform, it will resolve to one or multiple sequences) and that sequences should be preferred in this case.

      Attachments

        Issue Links

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

          Activity

            People

              andreas.eliasson Andreas Eliasson
              laurentgom Laurent
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes