I have a rectangle which could by moved vertically and horizontally by finger.
So in event "onPositionChanged", how could I tell the intend is vertically or horizontally.
I remembered that there is a common algorithm/standard, but can't remembered.
I have a rectangle which could by moved vertically and horizontally by finger.
So in event "onPositionChanged", how could I tell the intend is vertically or horizontally.
I remembered that there is a common algorithm/standard, but can't remembered.
Comparing the components and ignoring the smaller one? (Of course compare absolute values)
deltaX and deltaY...
Thanks. I am using that deltaX and deltaY in my way, not ideal. Can you be more detail about yours?
Just get tips from the snake game. Not try yet.
http://doc.qt.nokia.com/4.7/demos-de...ive-snake.html
Last edited by useryy2; 2011-08-16 at 11:37.