I have a main window, a table view, and a dialog window.
When the program shows the view, the focus stays on the main window - this is the desired behavior. When the program shows the dialog, the focus switches to the dialog - not desired behavior in my case.
I have tried the following lines to try and force the focus back to the main window when switching displays back and forth between the table view and the dialog (they are just different presentations of the same data and only one of them is shown at the same time):
Qt Code:
MainWindow::close(); MainWindow::show(); MainWindow::activateWindow(); MainWindow::raise(); ui->mwCall->setFocus();To copy to clipboard, switch view to plain text mode
No luck, focus always switches to the dialog when it is shown.
Dialog form focusPolicy is set to NoFocus and dialog is non-modal.
Any ideas as to what to try now? What am I missing?
Bookmarks