Results 1 to 4 of 4

Thread: Focus Help please

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Focus Help please

    Hi,

    I have a TabWidget in which every tab has ScrollView. Each ScrollView in turn has 4 or more LineEdits.

    When I click on the Tab bar to change the current page, one of the line edits of the current page gets the focus and the reason it shows is QFocusEvent::Mouse.

    1. How can I prevent the line edits from getting the focus when the tab is changed?
    2. Why is reason() showing Mouse when actually it is something else ?

    Thanks a lot

  2. #2
    Join Date
    Aug 2006
    Location
    troy, new york
    Posts
    24
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Focus Help please

    setReason/resetReason?

  3. #3
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Focus Help please

    Quote Originally Posted by nikita View Post
    setReason/resetReason?
    Can you please explain this a little more?

    Thanks a lot

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Focus Help please

    1. So which widget should get/retain the focus then? Maybe you could set a focus proxy?
    2. Isn't clicking on a tab a mouse action?
    J-P Nurmi

Similar Threads

  1. Tab/Enter focus problem
    By b1 in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2006, 23:34
  2. How to get focus event in child widget
    By YuriyRusinov in forum Qt Programming
    Replies: 4
    Last Post: 17th October 2006, 07:53
  3. Replies: 3
    Last Post: 26th September 2006, 12:16
  4. Replies: 5
    Last Post: 4th August 2006, 23:44
  5. Replies: 2
    Last Post: 24th July 2006, 18:36

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.