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

Keshava Krishna keshavkrishna88 at gmail.com
Thu Jul 9 06:04:58 CEST 2009


May be you can override mouse events in the widget that contains both your
buttons and label, there by u can get all mouse events...

On Thu, Jul 9, 2009 at 7:34 AM, Kermit Mei <kermit.mei at gmail.com> wrote:

> 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
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
Regards,
Keshava.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090709/c987df6c/attachment.html 


More information about the Qt-interest-old mailing list