Results 1 to 2 of 2

Thread: QAction questions

  1. #1
    Join Date
    Jan 2006
    Posts
    371
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QAction questions

    Question 1:
    I have this QAction in my application, and I would like to know if the user used the keyboard shortcut or the menu item to activate it. I have seen GoogleEarth doing it (with the Flight simulator), and wanted to know how to re-implement this.

    Question 2:
    I want to make an action, that behaves differently if "shift" is pressed when you clicked the menu item. I think KDE is doing this doe the "delete" command. Any ideas how to re-implement this in Qt4?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QAction questions

    Quote Originally Posted by elcuco View Post
    Question 2:
    I want to make an action, that behaves differently if "shift" is pressed when you clicked the menu item. I think KDE is doing this doe the "delete" command. Any ideas how to re-implement this in Qt4?
    How about testing QApplication::keyboardModifiers() in corresponding slot?
    J-P Nurmi

Similar Threads

  1. Memory management questions (im new to Qt)
    By scarvenger in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2007, 07:41
  2. Few newbie questions
    By Salazaar in forum Qt Tools
    Replies: 9
    Last Post: 3rd May 2007, 19:13
  3. Replies: 1
    Last Post: 18th March 2006, 16:37
  4. 2 Questions about layouts
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2006, 13:54
  5. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 12:25

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.