Results 1 to 6 of 6

Thread: Additional keyboard shortcut for a menu

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Dec 2007
    Posts
    628
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 89 Times in 87 Posts

    Default Re: Additional keyboard shortcut for a menu

    Here is your solution.

    Qt Code:
    1. void UIControl::openProjectMenu()
    2. {
    3. QPoint p = menubar->mapToGlobal(menubar->pos());
    4. p.setY(p.y() + menubar->height());
    5. m_projectMenu->exec(p);
    6. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to yogeshgokul for this useful post:

    negritot (16th September 2009)

Similar Threads

  1. Invoke QCompletion on keyboard shortcut
    By aspidites in forum Qt Programming
    Replies: 0
    Last Post: 30th August 2009, 10:32
  2. Rerouting messages for keyboard shortcut selection dialog.
    By andy.fillebrown in forum Qt Programming
    Replies: 1
    Last Post: 15th June 2009, 18:55
  3. Shortcut key for context menu
    By darshan.hardas in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2008, 20:32
  4. Button shortcut call an element in the menu
    By mourad in forum Qt Programming
    Replies: 5
    Last Post: 29th May 2008, 10:02

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.