[Qt-interest] How to pass a QMouseEvent to another object?

Kermit Mei kermit.mei at gmail.com
Thu Jul 9 04:04:04 CEST 2009


Hello community!

I want to implement a page-changing functions for a widget. And this
widget may contains some buttons and label.
Now, my requirement is:
If the user press on the widget, and drag for a certain distance, then
the widget will be change as another one.
But, if the user press on a button, or label, how to make the widget get
is mouse event? My implementation is like this: if the user press, then
record the pos, and in the mouseMoveEvent(...), if the user move 32pix,
the change the page. 
For now, if the user pressed on the buttons, then widget can't get this
mouseEvent, how can I solve it?

Thanks.
Kermit 




More information about the Qt-interest-old mailing list