View Single Post
Old 11-18-2023, 03:41 PM   #36
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 974
Karma: 3600000
Join Date: Jan 2017
Location: Poland
Device: Various
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."));
}
BeckyEbook is offline   Reply With Quote