If you cannot find a way to disable or hide it.Perhaps this way would help:
1.remove the window frame by using setWindowFlags()
2.draw the window frame yourself.
But you have a bunch of work to do,if you choose this way.
If you cannot find a way to disable or hide it.Perhaps this way would help:
1.remove the window frame by using setWindowFlags()
2.draw the window frame yourself.
But you have a bunch of work to do,if you choose this way.
It's not the goodbye that hurts,but the flashback that follow.
Ok,I find the flag.
See the screenshot below:
use Qt::CustomizeWindowHint,you will get no X button,but also no title....
It's not the goodbye that hurts,but the flashback that follow.
Try http://www.qtcentre.org/threads/2454...112#post142112
or alternatively, you could draw the title bar yourself.
I did it a few minutes ago for my application. In main.cpp, write:
Now you do not have close button, neither a menu close and ALT-F4 won't work.widget.setWindowFlags ( Qt::CustomizeWindowHint | Qt::WindowTitleHint);
widget.show();
Hope this can be helpful.
I'm using Qt4 under Linux
francomartins (20th June 2012), maratk1n (14th April 2017), ShaChris23 (28th July 2010)
I believe another way around would be hijacking close event, add this ti header file:
Qt Code:
private:To copy to clipboard, switch view to plain text mode
and this to cpp file:
Qt Code:
{ cout << "Here in close" << endl; event->ignore(); }To copy to clipboard, switch view to plain text mode
More info? https://doc.qt.io/qt-5/qwidget.html#closeEvent
Bookmarks