PDA

View Full Version : Widget focus confused



luochen601
28th July 2010, 07:35
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.

ChrisW67
30th July 2010, 05:42
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.