Hey guys. I have this app that the user can choose if he/she wants it always on top or not via a menu option. This is a chackable menu action that toggles the following method:
void MainForm::menuAlwaysOnTop(bool bEnable)
{
if (bEnable == true)
{
// This line is hiding my window :(
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
}
else
{
// remove Qt::WindowStaysOnTopHint
}
}
void MainForm::menuAlwaysOnTop(bool bEnable)
{
if (bEnable == true)
{
// This line is hiding my window :(
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
}
else
{
// remove Qt::WindowStaysOnTopHint
}
}
To copy to clipboard, switch view to plain text mode
My MainForm class derives from QMainWindow. The problem I am having is that when this method runs... my window disappears! Augh. I can't explain why. Does anyone have an idea of what I can do to fix this?
Bookmarks