QT:隐藏对话框/窗口的标题栏 [英] QT: Hide the title bar of a dialog/window

查看:599
本文介绍了QT:隐藏对话框/窗口的标题栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个父窗口,其中按钮的click event函数包含以下几行:

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

SplashScreenDialog * splScrDlg =新的SplashScreenDialog(this); splScrDlg-> show();

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]

推荐答案

为什么不使用QSplashScreen?

Why not using QSplashScreen?

从助手中摘录的示例:

 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();
 }

这篇关于QT:隐藏对话框/窗口的标题栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆