Reading the Qt::WindowFlags documentation, it looks like you might want Qt::Widget instead of Qt::Window. However, it also says that the Qt::Window bit cannot be cleared if the widget has no parent. So, you might try making the widget a child of the QDesktopWidget, which implies you might be able to clear the Qt::Window bit.
And it probably was a typo in your posting, but you also want "|" and not "||" in the setWindowFlags() call.
I would like to know if you try this and whether or not it works.
-- edit --
Looking further, it appears that if you set the flags Qt::Window | Qt::FramelessWindowHint | Qt::CustomizeWindowHint (and forget about the QDesktopWindow stuff above), this might do what you want.
-- further edit --
Verified using the QMainWindow-derived class in my own app that the above combination of flags removes the title bar.
MyMainWindow mainWindow( 0, Qt::Window | Qt::FramelessWindowHint | Qt::CustomizeWindowHint );
mainWindow.show();
MyMainWindow mainWindow( 0, Qt::Window | Qt::FramelessWindowHint | Qt::CustomizeWindowHint );
mainWindow.show();
To copy to clipboard, switch view to plain text mode
However, you also can't move, minimize, maximize, close, or do anything else with the window except to resize it using the grab handle at the lower right. That is really, really unfriendly behavior. Is that how you want your users to view your app?
Bookmarks