Results 1 to 3 of 3

Thread: Is there any easy way to get all child control's mouse click event??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    May 2008
    Posts
    58
    Thanks
    2

    Default Re: Is there any easy way to get all child control's mouse click event??

    yes, I got it, should be like this:
    Qt Code:
    1. QList<QWidget*> widgets = qFindChildren<QWidget*>(this);
    2. foreach(QWidget *widget, widgets)
    3. widget->installEventFilter(this);
    4. installEventFilter(this);
    To copy to clipboard, switch view to plain text mode 
    then we can install event filter for all children, that's perfect!
    good luck to every one who want to get this.
    Last edited by jpn; 4th August 2008 at 10:34. Reason: missing [code] tags

Similar Threads

  1. The event fired by the mouse click on the frame
    By Placido Currò in forum Qt Programming
    Replies: 8
    Last Post: 3rd March 2007, 09:05
  2. mouse click event
    By vijay anandh in forum Qt Programming
    Replies: 1
    Last Post: 1st May 2006, 09:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.