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 use same action of the key across any widget in the application?
Forum Updated to NodeBB v4.3 + New Features

How to use same action of the key across any widget in the application?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    Revu
    wrote on last edited by
    #1

    I want to use the keypress event in my application.I have many mainwindow with different class.If I use a key say F1 in any mainwindow it should execute the function that I had defined for F1.In simple,how do I make that specific keypress(F1) to be global in my application??Please guide me..
    Thank You

    Every fall is to raise higher than Before.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      You use a QAction with a QKeySequence and set the QActions "shortcut context":http://doc.qt.nokia.com/4.7/qaction.html#shortcutContext-prop

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      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