Solved How to set default focus for a Dialog
-
Hello I have a dialog that requires users to input a value to a spinbox.
Is it possible to set focus to the spinbox so that users can type numbers to it immediately?
-
-
@MasterBlade
In your constructor try this:ui->spinBox->clear(); QTimer::singleShot(200, ui->spinBox, SLOT(setFocus()));
-
@Taz742 said in How to set default focus for a Dialog:
@MasterBlade
In your constructor try this:ui->spinBox->clear(); QTimer::singleShot(200, ui->spinBox, SLOT(setFocus()));
Thanks for the help!