diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-06-15 09:53:43 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-06-15 09:54:18 (GMT) |
commit | b47c2c37167d8563d9b96bfdc171470cb4b53f9e (patch) | |
tree | 5c732a262efa26f200b55938e0ee5c2403adf889 /doc/src/snippets/code/src_gui_qproxystyle.cpp | |
parent | 49ab6e1a4c960912ea2fa631cc26cebf70560713 (diff) | |
download | Qt-b47c2c37167d8563d9b96bfdc171470cb4b53f9e.zip Qt-b47c2c37167d8563d9b96bfdc171470cb4b53f9e.tar.gz Qt-b47c2c37167d8563d9b96bfdc171470cb4b53f9e.tar.bz2 |
Added a code snippet for QProxyStyle
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] |