[Qt-interest] Detecting mousePressEvents in a child widget

Efan Harris efanharris at gmail.com
Fri Dec 12 20:39:22 CET 2008


hey use  setEventFilter installEventFilter mechanism.you will get all mouse
press or what ever

On Fri, Dec 12, 2008 at 11:10 AM, Khizer Kapadia
<khizerkapadia at hotmail.com>wrote:

>  Hi,
> I have a widget (lets call it MainWindow) containing a QScrollView (apart
> from several QPushButtons)
> QScrollView itself contains a QLabel
>
> What I am trying to achieve is, that whenever the user clicks on that
> QLabel, I want to hide or show the child widgets of MainWindow. I was
> initially of the idea that clicks within the child widgets are also taken to
> be clicks by the parent widget. I read the documentation and saw
> underMouse(), but I dont understand how that will work, since a click on the
> QLabel wont be detected MainWindow, so no question of returning which widget
> lies under it
>
> Thank you for your time.
>
> ------------------------------
> Send e-mail faster without improving your typing skills. Get your Hotmail(R)
> account.<http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081212/cadf01cc/attachment.html 


More information about the Qt-interest-old mailing list