Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QT: Hide the title bar of a dialog/window

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

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

What I want is I want to remove the maximize button, minimize button, close button and also the title bar from the dialog(or window). [Actually it is for a splash screen, it would contain an image for a while and then would exit automatically and opens the main window, you are welcome with other ideas for showing splash screen]

like image 318
Samir Avatar asked Mar 01 '23 05:03

Samir


1 Answers

Why not using QSplashScreen?

Example extracted from the assistant:

 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();
 }
like image 100
Cătălin Pitiș Avatar answered Mar 06 '23 13:03

Cătălin Pitiș