PDA

View Full Version : Get a window back on normal level after put it on top level



wazlid
11th November 2016, 09:06
Hello guys!
On my window i have a checkbox button that allows me to put the window on top level when it is checked and on normal window when it is unchecked. This is how i am trying to reach that but it is not working.
Thanks for help!!


Qt::WindowFlags flags = this->windowflags();
if(ui->istopLvlcheckBox->isChecked()){
flags |= Qt::WindowStaysOnTopHint;
}else{
flags &= ~Qt::WindowStaysOnTopHint;
}
this->setWindowFlags(flags);
this->show();