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 Code:
  1. Qt::WindowFlags flags = this->windowflags();
  2. if(ui->istopLvlcheckBox->isChecked()){
  3. flags |= Qt::WindowStaysOnTopHint;
  4. }else{
  5. flags &= ~Qt::WindowStaysOnTopHint;
  6. }
  7. this->setWindowFlags(flags);
  8. this->show();
To copy to clipboard, switch view to plain text mode