Disable QDialogs default close button (upper left “cross button”)?

前端 未结 4 1734
臣服心动
臣服心动 2020-12-10 03:51

Is it possible to disable/delete the QDialogs default close button at the upper left of the dialog?

4条回答
  •  庸人自扰
    2020-12-10 04:44

    At least in (embedded) Linux, you can do this:

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

    With that, I get a window which has the title but no buttons.

提交回复
热议问题