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. QEvent::ShortcutOverride problem
Forum Updated to NodeBB v4.3 + New Features

QEvent::ShortcutOverride problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 197 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.
  • B Offline
    B Offline
    Ben-ny
    wrote on last edited by
    #1

    I am using QEvent::ShortcutOverride to handle two shortcuts, F and Ctrl+F. Each time, I press Ctrl first, followed by F. However, the order in which the keys enter QEvent::ShortcutOverride is always F first, then Ctrl+F (determined by whether Ctrl is pressed through modifiers()). This makes it impossible for me to accurately distinguish between the two shortcuts F and Ctrl+F. Could it be that I am doing something wrong? If so, how can I correctly distinguish and handle the two shortcuts F and Ctrl+F?

    Axel SpoerlA 1 Reply Last reply
    0
    • B Ben-ny

      I am using QEvent::ShortcutOverride to handle two shortcuts, F and Ctrl+F. Each time, I press Ctrl first, followed by F. However, the order in which the keys enter QEvent::ShortcutOverride is always F first, then Ctrl+F (determined by whether Ctrl is pressed through modifiers()). This makes it impossible for me to accurately distinguish between the two shortcuts F and Ctrl+F. Could it be that I am doing something wrong? If so, how can I correctly distinguish and handle the two shortcuts F and Ctrl+F?

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @Ben-ny
      Please create a minimal, compilable reproducer.

      Software Engineer
      The Qt Company, Oslo

      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