Results 1 to 2 of 2

Thread: Widget focus confused

  1. #1
    Join Date
    May 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Widget focus confused

    My dialog window contains a custom widget.
    The custom widget contains one QLineEdit.
    Now I want the cursor appeared in that QLineEdit when program running.

    I use customWidget->setFocus() in dialog window failed to display cursor.
    I use lineEdit->setFocus() in custom widget failed to display cursor too.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Widget focus confused

    Works fine here. The cursor is only displayed if the parent window (or the widget if there is no parent) is active. Post a small, compilable example that displays this problem.

Similar Threads

  1. how to set focus on widget if it is selected??
    By sudhansu in forum Qt Programming
    Replies: 3
    Last Post: 30th January 2010, 06:42
  2. widget focus question
    By eva2002 in forum Newbie
    Replies: 1
    Last Post: 12th January 2010, 00:04
  3. Newbie - Confused about the central widget
    By N3wb in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2009, 05:46
  4. widget focus ---------
    By jrodway in forum Qt Programming
    Replies: 11
    Last Post: 27th April 2009, 09:16
  5. Widget Focus
    By navi1084 in forum Qt Programming
    Replies: 6
    Last Post: 29th September 2008, 10:22

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.