Qt::WindowCloseButtonHint and Qt::WindowContextHelpButtonHint



  • Hello,

    at first I am sorry for any mistakes in my English, but I hope you will understand my problem:
    I try to learn Qt and use Qt 5.8.0 with MinGW 5.3 (pre-compiled) inside the Qt Creator 4.2.1, my operating system is Windows.
    I want to write a Settings-Dialog which inherits QDialog. Now I tried to hint the Help-Button on the bar of the window.
    But when I set the flag Qt::WindowContextHelpButtonHint with this->setWindowFlags() the Close-Button was hidden. So I tried Qt::WindowCloseButtonHint to hide the Help-Button and it worked.
    Should I use Qt::WindowCloseButtonHint if it works or will it be incompatible with other versions of Qt?

    Sorry, my mistake. Qt::WindowContextHelpButtonHint shows of course the Help-Button and doesn't hide it. I confused the meanings of hint and hide.

    Thank you!


Log in to reply