[Qt-interest] Detecting mousePressEvents in a child widget

Khizer Kapadia khizerkapadia at hotmail.com
Fri Dec 12 20:10:41 CET 2008


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.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081212/7ec1a040/attachment.html 


More information about the Qt-interest-old mailing list