I'm trying to undo Stay on Top of Windows
settings on my app. I thought that by performing some bitwise operations, I will be able to undo the setting, but it is still showing on top of all the other windows.
void showKioskMode(){
//if(windowFlags()&Qt::WindowStaysOnTopHint){
if(ui->pushButton_3->text().compare("No Kiosk") == 0){
//showNormal();
Qt::WindowFlags flags = windowFlags();
flags &= ~Qt::WindowStaysOnTopHint;
setWindowFlags(flags);
ui->pushButton_3->setText("Yes Kiosk");
}
else{
//showFullScreen();
Qt::WindowFlags flags = windowFlags();
setWindowFlags(flags | Qt::WindowStaysOnTopHint);
ui->pushButton_3->setText("No Kiosk");
}
show();
}
I've checked that the if-body is being executed, but the window is still always on top of all other windows even though they have focus.