Devower
1st November 2014, 21:34
I'm trying to figure out a way to make the mouse/cursor be restricted to either moving only vertically or horizontally (along either the y or x axis). I understand that there is the QCursor::setPos that can give it a location, but I haven't been able to figure out how (if possible) to only move along one axis. My end goal is to be able to move the cursor in a perfectly straight horizontal or vertical fashion. I am handling this logic in a mouseMoveEvent so that when the shift button is held down, it forces this behavior.
Thank you.
Thank you.