Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Shortcut depending on the language

Shortcut depending on the language

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 2 Posters 1.6k 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.
  • Diego DonateD Offline
    Diego DonateD Offline
    Diego Donate
    wrote on last edited by
    #1

    Hi,

    I have a QT application with a large text, and I would like to show a 'Search' box when user clicks the system shortcut for this functionality. But this shortcuts depends on the current system language. I mean for example, in Windows + English, Search = "CRTL + F", but in Windows + Spanish, Search = "CRTL + B".

    How can I manage this issue and detect the good shorcut depending on the language? I would like to open my 'Search' box when the user presses CRTL+F (if system is in English), or when user presses CTRL+B (if system is in Spanish)

    Thanks in advance,
    Diego

    raven-worxR 1 Reply Last reply
    0
    • Diego DonateD Diego Donate

      Hi,

      I have a QT application with a large text, and I would like to show a 'Search' box when user clicks the system shortcut for this functionality. But this shortcuts depends on the current system language. I mean for example, in Windows + English, Search = "CRTL + F", but in Windows + Spanish, Search = "CRTL + B".

      How can I manage this issue and detect the good shorcut depending on the language? I would like to open my 'Search' box when the user presses CRTL+F (if system is in English), or when user presses CTRL+B (if system is in Spanish)

      Thanks in advance,
      Diego

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Diego-Donate
      since shortcuts can also be defined by strings you can use Qt translation capabilities

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      Diego DonateD 1 Reply Last reply
      1
      • raven-worxR raven-worx

        @Diego-Donate
        since shortcuts can also be defined by strings you can use Qt translation capabilities

        Diego DonateD Offline
        Diego DonateD Offline
        Diego Donate
        wrote on last edited by
        #3

        @raven-worx Thanks. But what I want is to use the System standar shortcut for 'Find', which depends on the system language. I don't want to create anything "mine", but use the standar functionality, is it possible?

        My application has QML, I don't use QWidgets for GUI. I have tried:

        Shortcut {
            sequence: StandardKey.Find
            context: Qt.ApplicationShortcut
            onActivated: console.log("find...")
        }
        

        But 'activated' is only called with CTRL+F (not depending on the language)

        raven-worxR 1 Reply Last reply
        0
        • Diego DonateD Diego Donate

          @raven-worx Thanks. But what I want is to use the System standar shortcut for 'Find', which depends on the system language. I don't want to create anything "mine", but use the standar functionality, is it possible?

          My application has QML, I don't use QWidgets for GUI. I have tried:

          Shortcut {
              sequence: StandardKey.Find
              context: Qt.ApplicationShortcut
              onActivated: console.log("find...")
          }
          

          But 'activated' is only called with CTRL+F (not depending on the language)

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @Diego-Donate said in Shortcut depending on the language:

          But what I want is to use the System standar shortcut for 'Find', which depends on the system language

          are you sure? i (personally) haven't heard of it.
          Normally a platform has some recommendations for the standard shortcuts. But no application really has to use it. I never found a different shortcut for copy for example...

          What system are you on?

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          Diego DonateD 1 Reply Last reply
          1
          • raven-worxR raven-worx

            @Diego-Donate said in Shortcut depending on the language:

            But what I want is to use the System standar shortcut for 'Find', which depends on the system language

            are you sure? i (personally) haven't heard of it.
            Normally a platform has some recommendations for the standard shortcuts. But no application really has to use it. I never found a different shortcut for copy for example...

            What system are you on?

            Diego DonateD Offline
            Diego DonateD Offline
            Diego Donate
            wrote on last edited by
            #5

            @raven-worx I think you are right, i am in Windows, and it seems that CTRL+F is the standar shortcut for 'Find' in Windows (not depending on the language...). Thanks a lot

            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