I did a trial and raise() seems sufficient.
It doesn't need to be added to the Code View, as no other widgets can be added to this window.
Code:
void MainWindow::FocusOnBookBrowser()
{
FocusOn(m_BookBrowser);
m_BookBrowser->FocusOnBookBrowser();
m_BookBrowser->raise();
ShowMessageOnStatusBar(tr("Focus changed to BookBrowser window."));
}
void MainWindow::FocusOnPreview()
{
FocusOn(m_PreviewWindow);
m_PreviewWindow->SetFocusOnPreview();
m_PreviewWindow->raise();
ShowMessageOnStatusBar(tr("Focus changed to Preview window."));
}
void MainWindow::FocusOnTOC()
{
FocusOn(m_TableOfContents);
m_TableOfContents->SetFocusOnTOC();
m_TableOfContents->raise();
ShowMessageOnStatusBar(tr("Focus changed to Table Of Contents window."));
}
void MainWindow::FocusOnClips()
{
FocusOn(m_Clips);
m_Clips->SetFocusOnClips();
m_Clips->raise();
ShowMessageOnStatusBar(tr("Focus changed to Clips window."));
}