c++ - 禁用 QDialogs 默认关闭按钮(左上角 "cross button")?

标签 c++ qt qdialog

是否可以禁用/删除对话框左上角的QDialogs默认关闭按钮?

最佳答案

至少在(嵌入式)Linux 中,您可以这样做:

setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);

这样,我得到一个有标题但没有按钮的窗口。

关于c++ - 禁用 QDialogs 默认关闭按钮(左上角 "cross button")?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9965224/

相关文章:

c++ - Qt firstVisibleBlock const is protected 错误

c++ - Qt库,子类窗口拦截消息?

c++ - 如何从自定义 ODBC 驱动程序创建 DSN?

c++ - 有没有办法#if Objective-C++?

qt - 带 slider 的 qml textedit

python - PyQt - 如何检查 QDialog 是否可见?

c++ - QDialog exec() 并获取结果值

c++ - Qt QDialog 每次关闭并再次显示时都会稍微移动位置

c++ - 即使使用 std::cin.ignore() 后,std::cin 也会被跳过

c++ - 如何在 C++ 中将 int 连接到 wchar_t*?