下面两种方法均可让对话框的问号按钮去掉,如果其中一种不生效,可更换另一种

1 方法一

Qt::WindowFlags flags = Qt::Dialog;
flags |= Qt::WindowCloseButtonHint;
dlg->setWindowFlags(flags);

2 方法二

this->setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint);

 

相关文章:

  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2021-11-29
  • 2021-09-30
猜你喜欢
  • 2022-12-23
  • 2021-09-19
  • 2021-09-30
  • 2022-02-07
  • 2022-12-23
相关资源
相似解决方案