Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

click issue between 2 different application



  • 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.


  • Moderators

    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!



    • bash scripting
    • launch by ./qtapp -qws
    • sleeping 1 second in bash script using "sleep 1"

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



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



  • 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.



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


Log in to reply