Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Ideas on Implementing mouse press/move /release (theoretical question)
musimbate last edited by
I am working with a projector device that communicates with my Qt application and sends me the coordinates of the touched points on the screen and I an getting those points from the projector driver installed on our test machine.
The problem I have is that I am only getting coordinate information and nothing more: something like:
and I need some kind of mechanism , similar to press/move /release of the mouse to know when to start and end the drawing.(I am working on a pen drawing application). I have thought of using some timers and set up some rules but this kind of limits the user.
Any Ideas on how one can implement this.I realize this is not a Qt problem but I could use some help.Any input will be appreciated.
andre last edited by
Perhaps you can leverage Qt 5's QPA (Qt Platform Abstraction) interfaces? It provides an interface for input methods as well.
NicuPopescu last edited by
could you tell what projector, or something similar? are you sure the state changes of "one point" with/without coordinates info is not registered and can be get via driver? Actually I wonder what does a "touched point" means for your device?
musimbate last edited by
Thank you all for the replies:
@Andre: QPA looks promissing but not applicable to the current state of the project.
@NicuPopescu:Our project is a whiteboard system.Users use an IR pen to write on the screen and I get coordinates of the touched points(Hope this makes ''touched points clear").I think the projector system should have a way to give this informantion and their company just gave us a simple API that generates points as you move the pen(just like mouse move event) and nothing else.Still looking for a possible way around this.
Thanks again for your replies.
Vaquita Tim last edited by
Yes, as you say, you only really have information which could interpret as mouse move events.
And yes, really you should get some more data from the company's sdk...
Still, if I understand correctly, the points only come when the pen is touching. And, when the pen is not touching, you get no data. And when the pen is moving round touched to the board, I imagine you get data at a fairly fixed rate. In which case I think the "timer" option you mention sounds reasonable. Just wrap each series of points with a mouse down and a mouse up, and have the mouse move values in between (with the left button down flag set).