Results 1 to 6 of 6

Thread: Question about focus

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: Question about focus

    Qt Code:
    1. bool MyMainWindow::eventFilter(QObject *obj, QEvent *evt)
    2. {
    3. QWidget * w = dynamic_cast<QWidget *>(obj);
    4. if(w == ww1)
    5. return false; // widget 1 event
    6. else if(w == ww2)
    7. return false; // widget 2 event
    8. else
    9. return QMainWindow::eventFilter(obj, event);
    10. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to Santosh Reddy for this useful post:

    franco.amato (14th July 2011)

Similar Threads

  1. Question about focus
    By franco.amato in forum Qt Programming
    Replies: 2
    Last Post: 22nd January 2010, 18:46
  2. widget focus question
    By eva2002 in forum Newbie
    Replies: 1
    Last Post: 12th January 2010, 01:04
  3. Window focus question
    By waynew in forum Newbie
    Replies: 3
    Last Post: 1st November 2009, 00:11
  4. Window focus issues (How to force focus to a window?)
    By montylee in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2009, 02:00
  5. Focus issues / Setting multiple focus
    By ComputerPhreak in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2007, 07:09

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.