【发布时间】:2014-11-18 21:16:36
【问题描述】:
我在我的 qt 应用程序中显示一个对话框,菜单操作单击窗口显示完美,但我想隐藏它的标题栏,因为它只是主窗口内的一个子窗口。
我试过了:
this->setWindowFlags(Qt::Window |Qt::FramelessWindowHint);
在对话框构造函数中:
ui->setupUi(this);
this->setWindowState (Qt::WindowActive);
setWindowModality(Qt::ApplicationModal);
setAttribute (Qt::WA_DeleteOnClose);
this->setWindowFlags(Qt::Window |Qt::FramelessWindowHint) ; //
这确实删除了标题栏,但它也隐藏了主窗口,这对我的应用程序不利。
如何在不影响应用程序基本主窗口的情况下隐藏对话框标题栏?
【问题讨论】:
-
QDialog remove title bar 可能重复。