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

Button gets latched at times



  • Environment:
    Qt 4.8
    Embedded
    AM3358

    In the embedded target, at times I see that the button gets latched ( in pressed stated ). And then if I press it again, it comes back to the normal state. This is not how the application was designed.

    Any thoughts on what you could be the root cause?

    We are moving ahead to Qt 5.12. Will this upgradation solve the problem? If yes, how and why?

    Thank you,
    Kumara


  • Lifetime Qt Champion

    Hi
    One reason can be the touch setup. if it only sends mouse press and not
    mouseReleased it might get stuck.

    Could also be a bug in Qt4.8 that the later fixed with Grabmouse

    If you test with a mouse (press button, and hold it down, then mouse out of widget and release)



  • Thank you for the response @mrjj.

    @mrjj said in Button gets latched at times:

    One reason can be the touch setup

    Can you please explain a little more on this?
    Pressing the button works good almost all the time. That is, when I touch the button, button goes to pressed state and the gets released. Button getting stuck at pressed state happens randomly.

    Could also be a bug in Qt4.8 that the later fixed with Grabmouse

    Is there any defect ID that you remember? That will add more waitage for the understanding.

    If you test with a mouse (press button, and hold it down, then mouse out of widget and release)

    I will test this situation and get back with the results.

    Additionally, the same application can run on Ubuntu and the TI based target. This problem is observed only on target. I cannot be fully sure because, we do extensive testing on target but on Ubuntu the basic minimal testing.

    One of the other thought that I have is, if this is really a UI issue or this is being a side effect due to any other problems such as CPU load, Memory full, etc. Do you think it is possible?

    Thank you,
    Kumara


  • Lifetime Qt Champion

    Hi

    • One reason can be the touch setup
      -- Can you please explain a little more on this?
      Well since it only happens sometimes, i guess its not that.
      I have seen something like it when touch was setup for gestures and you kinda moved the finger
      when you "clicked" it would then start the gesture and sort of eat the click.

    • Could also be a bug in Qt4.8 that the later fixed with Grabmouse
      -- Is there any defect ID that you remember? That will add more waitage for the understanding.
      Sorry nope. it was a duck. It was due to calling a message box that would run event loop and
      button would not redraw before after.

    • One of the other thought that I have is, if this is really a UI issue or this is being a side effect due to any other -problems such as CPU load, Memory full, etc. Do you think it is possible?

    Yes that is really possible if the target is low powered board and it's low on say ram then the same task might
    suddenly take much longer and the button will appear down.

    Have you tested with a button that does nothing and see if that can get stuck?