Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. click issue between 2 different application
Forum Updated to NodeBB v4.3 + New Features

click issue between 2 different application

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 406 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.
  • S Offline
    S Offline
    schu87
    wrote on last edited by
    #1

    hey there!
    I'm experiencing something pretty weird.
    I have a script launching different qt application one after the termination of the previous, the script sleeps for 1 second among every one.
    It 's a really simple script running really simple processes.
    Almost every process shows a widget with 2 buttons at the bottom of the screen (yes and no), the application terminates right when the user clicks one of the 2 buttons returning the result of the choice. This result does not affect any further qt invoke, it is stored and used at the end.
    My problem is: if the user in during one choice double clicks on a button for some reason, the first click is processed correctly by the current qt application, the second click is "saved" by the environment and processed as soon as the next qt application shows its widget and runs.
    Second click event is in the same spot of the first click (in the previous qtapp) resulting in the click of the same button chosen before.

    How can I block this behaviour? it seems the event loop is not cleared.
    I'm thinking on some workaround as moving mouse cursor outside of the window before running the qtapp, or a timer which avoid early click event processing. But I'm searching for a more canonical solution.

    I'm using qt embedded version 4.8, on a linux machine running on a cortex a8 processor (freescale imx53).
    Thanks into advance for reading and suggestions.

    J.HilkJ 1 Reply Last reply
    0
    • S schu87

      hey there!
      I'm experiencing something pretty weird.
      I have a script launching different qt application one after the termination of the previous, the script sleeps for 1 second among every one.
      It 's a really simple script running really simple processes.
      Almost every process shows a widget with 2 buttons at the bottom of the screen (yes and no), the application terminates right when the user clicks one of the 2 buttons returning the result of the choice. This result does not affect any further qt invoke, it is stored and used at the end.
      My problem is: if the user in during one choice double clicks on a button for some reason, the first click is processed correctly by the current qt application, the second click is "saved" by the environment and processed as soon as the next qt application shows its widget and runs.
      Second click event is in the same spot of the first click (in the previous qtapp) resulting in the click of the same button chosen before.

      How can I block this behaviour? it seems the event loop is not cleared.
      I'm thinking on some workaround as moving mouse cursor outside of the window before running the qtapp, or a timer which avoid early click event processing. But I'm searching for a more canonical solution.

      I'm using qt embedded version 4.8, on a linux machine running on a cortex a8 processor (freescale imx53).
      Thanks into advance for reading and suggestions.

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

      hi @schu87 said in click issue between 2 different application:

      I have a script launching different qt application one after the termination of the previous,

      • what kind of script in what language?
      • how are your qt application launched
      • how do you "sleep"

      But I'm searching for a more canonical solution.

      react on pressed not on the clicked signal, I could imagine, this doing something for you!


      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
      • S Offline
        S Offline
        schu87
        wrote on last edited by
        #3
        • bash scripting
        • launch by ./qtapp -qws
        • sleeping 1 second in bash script using "sleep 1"

        I'll try the pressed signal instead of clicked...

        1 Reply Last reply
        0
        • S Offline
          S Offline
          schu87
          wrote on last edited by schu87
          #4

          nope, pressed instead of clicked didn't solve the issue...

          1 Reply Last reply
          0
          • S Offline
            S Offline
            schu87
            wrote on last edited by schu87
            #5

            update: not only a normal-double-click, but also a slow-double-click with the second click performed during sleep-time between processes, triggers the issue.

            For slow-double-click I mean 2 clicks made slower enough which normally would be interpreted as 2 different clicks.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              schu87
              wrote on last edited by
              #6

              I used a workaround with a timer to pass by this issue...
              But I still have no idea how to solve it

              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