Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to Make Accelerator with & Sign to Work on Mac?
QtWS25 Last Chance

How to Make Accelerator with & Sign to Work on Mac?

Scheduled Pinned Locked Moved Unsolved General and Desktop
shortcutmac
4 Posts 2 Posters 672 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ChiK
    wrote on last edited by
    #1

    Hi,

    I'm on QT 5.13.2.
    When I create a button with QPushButton("&Set", this), I can trigger it with alt+s on Windows.
    However, I tried command+s, option+s, control+s on Mac, and none of them works.
    Is this a bug?
    Thanks for your help,

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you provide a minimal compilable example that shows that behaviour ?
      What version of macOS are you running ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Can you provide a minimal compilable example that shows that behaviour ?
        What version of macOS are you running ?

        C Offline
        C Offline
        ChiK
        wrote on last edited by
        #3

        @SGaist According to QShortcut doc, "On Mac, shortcuts are disabled by default."
        I found this post to make it work somewhat.
        https://www.qtcentre.org/threads/39097-Keyboard-shortcuts-(Mac-specific-)

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Right, I forgot that part.

          The "workaround" is explained in the QKeySequence documentation linked from the QShortcut one.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved