Results 1 to 5 of 5

Thread: [Solved] Qt Default hotkey for settings

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Posts
    21
    Thanks
    11
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default [Solved] Qt Default hotkey for settings

    Hi,

    how can i set up a shortcut for the settings/options in the menu, or better in QAction?

    For example the new default shortcut is QKeySequence::New...

    This is important because on Mac Os the default hotkey for settings is ⌘ + ,

    anyone?
    Last edited by 0xl33t; 21st July 2009 at 22:17.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Default hotkey for settings

    What's about QAction::setShortcut()?

  3. #3
    Join Date
    May 2009
    Posts
    21
    Thanks
    11
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt Default hotkey for settings

    sorry for my bad english, but i mean, is there a standard shortcut for the settings, provided by QT QKeySequence?

    Btw. i solved this "problem" because qt automatically detects the settings action:

    settingsAction = new QAction(tr("&Settings..."), this);

    and sets the right shortcut for mac os...

    So QT is very cute xD

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Default hotkey for settings

    Quote Originally Posted by 0xl33t View Post
    sorry for my bad english, but i mean, is there a standard shortcut for the settings, provided by QT QKeySequence?
    OK, there is not. I wonder why...

    Btw. i solved this "problem" because qt automatically detects the settings action:

    settingsAction = new QAction(tr("&Settings..."), this);

    and sets the right shortcut for mac os...
    It's not automatic, it's because of your "&" in the action text.

  5. #5
    Join Date
    May 2009
    Posts
    21
    Thanks
    11
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Smile Re: Qt Default hotkey for settings

    Quote Originally Posted by Lykurg View Post
    OK, there is not. I wonder why...


    It's not automatic, it's because of your "&" in the action text.
    nope :P

    the shortcut setted with &settings is the menu shortcut.

    And on mac, QT sets ⌘ + , and not Ctrl + S
    and moves the setting action from the edit menu to the menu right under the application name, like any mac os program

Similar Threads

  1. Getting the name of the default style
    By gregsan in forum Qt Programming
    Replies: 4
    Last Post: 28th September 2011, 19:00
  2. QTreeView default drag action
    By onamatic in forum Qt Programming
    Replies: 2
    Last Post: 1st March 2010, 07:37
  3. Replies: 6
    Last Post: 8th July 2009, 20:28
  4. Getting default "system" palette[solved]
    By maverick_pol in forum Qt Programming
    Replies: 0
    Last Post: 2nd April 2008, 17:34
  5. default argument compiler warning
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2007, 14:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.