diff options
Diffstat (limited to 'doc/src/snippets/code/src_gui_qproxystyle.cpp')
-rw-r--r-- | doc/src/snippets/code/src_gui_qproxystyle.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_gui_qproxystyle.cpp b/doc/src/snippets/code/src_gui_qproxystyle.cpp new file mode 100644 index 0000000..7633160 --- /dev/null +++ b/doc/src/snippets/code/src_gui_qproxystyle.cpp @@ -0,0 +1,15 @@ +//! [0] +class MyProxyStyle : public QProxyStyle +{ +public: + + int styleHint(StyleHint hint, const QStyleOption *option = 0, + const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const + { + if (hint == QStyle::SH_UnderlineShortcut) + return 1; + return QProxyStyle::styleHint(hint, option, widget, returnData); + } +}; + +//! [0] |