How to Remove "?" button from QWidget Window titlebar?
-
Using QT 5.9 ... code below works if using QDialog but not QWidget
I have experimented with various window type and flags combinations and can't seem to remove the infamous "What's this button"constructor is
QWidget(parent, (Qt::Window | Qt::WindowTitleHint | Qt::WindowStaysOnTopHint))...
// Remove the context help button (?).
Qt::WindowFlags flags = windowFlags();
flags = (flags & ~Qt::WindowContextHelpButtonHint);
b = flags.testFlag(Qt::WindowContextHelpButtonHint);
setWindowFlags(flags);Any help (no pun intended) appreciated
-
When does this "?" button comes ? I tried on the Windows and MAC with default Qt Widget application. I did not see the "?" button. I'm curious.
-
@J-Hilk just curious. Where is this button ? It may be my oversight.
-
@dheerendra
afaik it's not part of the default window, but it exists.
Example: