qt: disable window context help buttons
This commit is contained in:
@@ -11,4 +11,11 @@ int StyleOverride::styleHint(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
||||||
|
}
|
||||||
|
|
||||||
|
void StyleOverride::polish(QWidget* widget)
|
||||||
|
{
|
||||||
|
/* Disable title bar context help buttons globally as they are unused. */
|
||||||
|
if (widget->isWindow())
|
||||||
|
widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||||
}
|
}
|
@@ -2,6 +2,7 @@
|
|||||||
#define QT_STYLEOVERRIDE_HPP
|
#define QT_STYLEOVERRIDE_HPP
|
||||||
|
|
||||||
#include <QProxyStyle>
|
#include <QProxyStyle>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
class StyleOverride : public QProxyStyle
|
class StyleOverride : public QProxyStyle
|
||||||
{
|
{
|
||||||
@@ -11,6 +12,8 @@ public:
|
|||||||
const QStyleOption *option = nullptr,
|
const QStyleOption *option = nullptr,
|
||||||
const QWidget *widget = nullptr,
|
const QWidget *widget = nullptr,
|
||||||
QStyleHintReturn *returnData = nullptr) const override;
|
QStyleHintReturn *returnData = nullptr) const override;
|
||||||
|
|
||||||
|
void polish(QWidget* widget) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
Reference in New Issue
Block a user