My original issue was that I could not edit a QLineEdit on a QDialog when the dialog was initially shown. Other widgets worked as expected. To get around the problem, I had to click the QLineEdit then move the dialog window to a new location (or minimize/restore). I then clicked the QLineEdit again and was able to edit the contents. Thereafter all QLineEdits on the dialog were editable. This issue occurred on QDialogs in the app which contained QLineEdits.
After several Google searches and attempting several of the suggestions, my problem space has shifted to not having focus on the dialog (now a QWindow) on the initial show. I always have to click on the body of the dialog once to get focus. Clicking the title bar or moving the dialog doesn't help. Thereafter any mouse click/edit operation works as expected. No widget (QLineEdit, QRadioButton, QPushButton, QCheckBox, QTableWidget) is functional until that initial click. The initial click does not perform the normal action if a widget, as opposed to a blank area, is selected. Focus always ends up on the first QLineEdit. Sending a mouse click event from the main window to the dialog, after the dialog is the active window/raised, does not help. Using set focus and focus proxy didn't help.
The dialog is modeless. The QPushButtons, QCheckBoxes and QTableWidget have clink focus. The QRadioButtons have no focus. The QLineEdits have strong focus.
Qt 4.6.3 (cannot upgrade)
RHEL 5.5 (cannot upgrade)
KDE Desktop (cannot change)
How can I get focus on the dialog without the extra click?
Thanks for your consideration
Bookmarks