How to set focus on control
I have a class derived from QVBoxLayout and it has several controls derived from QWidget. When I press cursor arrows focus switches from control to control correctly. But when I try to set focus with QWidget::setFocus() nothing happens. Focus stays on previous control. Question is how to set focus on needed control grammatically?
Thanks.
Re: How to set focus on control
Can you show some relevant code?
Re: How to set focus on control
Unfortunately no... It's a huge project that I need to fix and now I am trying to understand how it works.
Re: How to set focus on control
Try setting the focus on the first widget BEFORE you show the window in which the widgets are in.
See if setFocus() works then.