Qt - Disabling QDialog's “?” button

前端 未结 4 694
旧巷少年郎
旧巷少年郎 2021-02-07 01:15

I create an instance of QDialog and on the left of \'x\' (close) button i have also \'?\' button. How I can disable that \'?\' ?

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-07 02:03

    Change the window flags, for example in the constructor:

    this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
    

提交回复
热议问题