[Qt-interest] Initial text selection in dialogs

Kyle Alons kyle at kinook.com
Wed Jun 17 18:33:27 CEST 2009


> I'd first try comboBox->setFocus(Qt::OtherFocusReason) in the dialog
> constructor.  If that didn't work, I'd probably try
> comboBox->lineEdit()->selectAll() before setting the focus.
>

lineEdit()->selectAll() works (thanks), but shouldn't Qt implement the 
native behavior automatically? 




More information about the Qt-interest-old mailing list