Answer the question
In order to leave comments, you need to log in
How to remove all buttons and menus from a window in Qt?
There are two standard windows (mainwindow and printorder). The second is added to the first in mdiArea as a child window. And it is EXTREMELY necessary for me that it does not have buttons and menus on top. I removed the minimize button and min / max with the help of flags, but the menu and the cross are not removed. What are the options?
In the window code printorder indicated:
this->setWindowFlag(Qt::WindowMinimizeButtonHint, false);
this->setWindowFlag(Qt::WindowMinMaxButtonsHint, false);
this->setWindowFlag(Qt::WindowSystemMenuHint, false);
this->setWindowFlag(Qt::WindowCloseButtonHint, false);
this->setWindowFlag(Qt::WindowFullscreenButtonHint, false);
auto flags = PrOrd->windowFlags();
flags.setFlag(Qt::MSWindowsFixedSizeDialogHint);
ui->mdiArea->addSubWindow(PrOrd, flags & ~Qt::WindowCloseButtonHint);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question