【发布时间】:2012-10-24 17:01:12
【问题描述】:
我想从 Qt 对话框中删除“?”按钮,如 here 解释的那样,但不知何故它不起作用。
这是我的代码:
Qt::WindowFlags flags;
flags = (Qt::Dialog | Qt::WindowStaysOnTopHint) &
~Qt::WindowContextHelpButtonHint;
setWindowFlags( flags );
我认为位运算符有问题,但我不知道是什么..
【问题讨论】:
-
How can I hide/delete the "?" help button on the "title bar" of a Qt Dialog? 的可能重复项 这实际上是重复项。 OP 没有正确遵循链接帖子中的说明;答案仍然存在。