Results 1 to 3 of 3

Thread: Focus Out problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2007
    Location
    Italy
    Posts
    69
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Focus Out problem

    Hi,
    Qt has a fine control over focus, too.
    I think your problem is the focus policy: one widget at time may have the focus, and if one has it, you shall pass the focus to another widget to remove it or clear the focus for that widget. In Qt, QWidget has by default the policy of not accepting focus, while QLineEdit has the policy of accepting it: this is why, if you click on another input field, the original focus is loosed.
    If you want to clear the focus from your QLineEdit by just clicking the window, cou can call yourWindow->setPolicy(Qt::StrongFocus).
    HIH
    ~Aki

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

    Chirag (2nd May 2011)

Similar Threads

  1. OnScreenKeyboard tab focus problem
    By BalaQT in forum Qt Programming
    Replies: 6
    Last Post: 25th March 2011, 09:13
  2. Problem of Focus QMacNativeWidget
    By skuallpa in forum Qt Programming
    Replies: 1
    Last Post: 21st July 2010, 14:19
  3. Focus problem
    By waynew in forum Qt Programming
    Replies: 4
    Last Post: 1st May 2010, 01:24
  4. QLineEdit focus problem
    By matteo.cozzaglio in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2009, 14:13
  5. Tab/Enter focus problem
    By b1 in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2006, 23:34

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.