Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Plz some one help me to find this..
Posted

I think you can subclass QWidget by overriding mouseMoveEvent(QMouseEvent *event).
From documentation:

The mouseMoveEvent() handles "mouse move" events. By default, these events are only generated when the user is holding down a button. It is possible to change this behavior by calling QWidget::setMouseTracking()
 
Share this answer
 
v2
First, take a look at this, which does not answer your question, but does provide some information.

http://qt-project.org/doc/qt-4.8/application-windows.html#window-geometry[^]

ALthough I have never done this, you may need to write your own class (sub-class the class of interest) and then over-ride the move method (or is that a slot). Yes, it is a method that is called when the class is moved. I did not check the source, but, I expect that given move(x, y) and move(point), one calls the other, but I did not verify this. I am only guessing.

If you know that this will only be moved using the mouse (and not the keyboard), setMouseTracking may help, but I did not look at that in any way.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900