From b47c2c37167d8563d9b96bfdc171470cb4b53f9e Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Mon, 15 Jun 2009 11:53:43 +0200 Subject: Added a code snippet for QProxyStyle --- doc/src/snippets/code/src_gui_qproxystyle.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/src/snippets/code/src_gui_qproxystyle.cpp 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] -- cgit v0.12