I am writing Ui application for an embedded device running on Embedded Linux. Each widget has QSS styles for "focused" cases. But widget that has focus does not get styled immediately after I press it.
While debugging I realized that mousePressEvent() is not called when I press, but it is called right before mouseReleaseEvent() or mouseMoveEvent(). In other words, mousePressEvent() is not called until I release or make the first move of mouse (my finger in this case).
I overloaded mousePressEvent(), mouseMoveEvent() and mouseReleaseEvent() to print debug messages. Here are the differences between expected and real logs:
// Expected
// (my action) debug message
(I touch the screen) "mouse pressed"
(I release) "mouse released"
// Real case
(I touch) // nothing is printed
(I release) "mouse pressed"
"mouse released"
In the desktop application, with actual mouse everything works as expected.
Problem is in the target device.
It is my first project with Embedded Linux and target device. I do not know what to do. What I should check, compare, install/remove. In which direction I should go/do research. What is going on here?