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. Focus Stealing
Qt 6.11 is out! See what's new in the release blog

Focus Stealing

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 3 Posters 947 Views
  • 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.
  • H Offline
    H Offline
    Harsh13
    wrote on last edited by
    #1

    Once the Qt application is opened, how to ensure that it cannot be switched to a different screen?

    J.HilkJ 1 Reply Last reply
    0
    • H Harsh13

      Once the Qt application is opened, how to ensure that it cannot be switched to a different screen?

      J.HilkJ Online
      J.HilkJ Online
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      Hi @Harsh13 and welcome

      the answer is you can't that is managed by your Operation System/ Window Manager.

      Maybe there's a way to archive what you want, what exactly do you want to prevent?


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Harsh13
        wrote on last edited by
        #3

        Consider this scenario- I've changed the value of a button and without confirming the value, I switch to another screen. Later when I switch back to the application, the value is automatically confirmed which is not the expected behavior.

        ODБOïO 1 Reply Last reply
        0
        • H Harsh13

          Consider this scenario- I've changed the value of a button and without confirming the value, I switch to another screen. Later when I switch back to the application, the value is automatically confirmed which is not the expected behavior.

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by
          #4

          @Harsh13 hi,
          what do you mean by " I've changed the value of a button .. without confirming the value " ?

          maybe this can help Dialog Windows

          1 Reply Last reply
          0
          • H Offline
            H Offline
            Harsh13
            wrote on last edited by
            #5

            There's a button, on click of which, the value gets incremented and when clicked again, the changed value gets confirmed. If incremented and not confirmed, a color animation(similar to blinking ) begins for 30 seconds.
            Now if I click on the button and increment the value without confirming it and switch to a different screen and then come back to the application, it should remain on the value without getting confirmed.

            J.HilkJ 1 Reply Last reply
            0
            • H Harsh13

              There's a button, on click of which, the value gets incremented and when clicked again, the changed value gets confirmed. If incremented and not confirmed, a color animation(similar to blinking ) begins for 30 seconds.
              Now if I click on the button and increment the value without confirming it and switch to a different screen and then come back to the application, it should remain on the value without getting confirmed.

              J.HilkJ Online
              J.HilkJ Online
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @Harsh13
              that is the default behavior.

              Buttons don't emit the clicked signal during focus change.


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              1 Reply Last reply
              0
              • H Offline
                H Offline
                Harsh13
                wrote on last edited by
                #7

                Button as in a rectangle which when clicked performs the action

                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