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 can I catch Shift + Ctrl key?

How can I catch Shift + Ctrl key?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 3.4k 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.
  • D Offline
    D Offline
    dlodyakov
    wrote on last edited by
    #1

    Hi. I want to catch Shift + Ctrl key in QTabWidget
    @ case Qt::Key_Tab:
    {
    if(modifier & Qt::ControlModifier)
    {
    if(modifier & Qt::ShiftModifier)
    {
    switchToPreviousTab();
    return;
    }
    else
    {
    switchToNextTab();
    return;
    }
    }
    }
    @
    Why this code doesn't work? Ctrl + Shift + Tab is working without my code, but I need to change behaviour. How can I fix that problem?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mirswith
      wrote on last edited by
      #2

      Have you stepped through this and checked the value of 'modifier'; is it possible your switch tab functions are the culprits?

      The docs also mention: "Warning: This function cannot always be trusted. The user can confuse it by pressing both Shift keys simultaneously and releasing one of them, for example."

      update: Also, be sure you accept or ignore the event whether or not you handled it.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MentalMath
        wrote on last edited by
        #3

        I think there is lucking code or may be there is something wrong with the system.

        http://www.superspeedlearning.com/forkids/mental-arithmetic/

        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