[Solved] Set Focus for a particular control in a custom dialog
Vholf3D
Posts: 63
Is it possible to set the focus on a given Widget in a DzBasicDialog?
I am adding 2 edit boxes and I need the first one to be on focus when the dialog opens but the Accept button is on focus by default and I can't find a way to change it.
Thanks.
Post edited by Vholf3D on
Comments
If your Widget is a subclass of QWidget, you can use QWidget::setFocus()
EDIT: You may need to use DzWidget::getWidget() first...
Ah, I wans't doing getWidget() first, I was trying to operate on the DzWidget. That worked, thank you!