Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Focus always on First Widget
Sebastian last edited by
I have a layout QHboxlayout in which i have 3 widgets added.My problem is when i start the application the focus is always on the first widget.I have no set any focus.Even If i am clicking on other widget the focus shift on first widget.I dont know from where the focus is coming.
Do any one have idea how can i identify that from where the focus is setting on the first widget.Please let me know.
@Sebastian Which widget should have the focus when starting?
If you designed your UI with Designer you can edit the tab-order there. Else you can set focus after setupUi() call using http://doc.qt.io/qt-5/qwidget.html#setFocus-1
"i am clicking on other widget the focus shift on first widget" - this sounds strange. Are you doing something with focus/events in your app?