QT: Hide dialog box / window title bar

I have a parent window in which the button click event function has the following lines:

SplashScreenDialog * splScrDlg = new SplashScreenDialog (this); splScrDlg-> show ();

I want me to delete the maximize button, minimize button, close button, and also the title bar in the dialog box (or window). [Actually, this is for the splash screen, it will contain an image for a while, and then it will automatically exit and open the main window, you can show the splash screen with other ideas]

+4
source share
2 answers

Why not use QSplashScreen?

Example extracted from the helper:

int main(int argc, char *argv[]) { QApplication app(argc, argv); QPixmap pixmap(":/splash.png"); QSplashScreen splash(pixmap); splash.show(); app.processEvents(); ... QMainWindow window; window.show(); splash.finish(&window); return app.exec(); } 
+6
source

Why not use QSplashScreen for this? In any case, you can set the window flags to remove the window decoration. See the documentation for QWidget::setWindowFlags and Qt::WindowFlags .

+2
source

All Articles