diff options
author | Morten Sørvig <msorvig@trolltech.com> | 2009-06-16 11:20:15 (GMT) |
---|---|---|
committer | Morten Sørvig <msorvig@trolltech.com> | 2009-06-16 11:20:15 (GMT) |
commit | c41591d57377cd7c520efc93d9c087ad34d2bb6f (patch) | |
tree | 975a8573da68b3f9bd169ecf607f7492f723a003 /doc/src | |
parent | 1e6b142fa2833f55972d6d4aa7dde0bb215c2f25 (diff) | |
parent | acc764552c552df31719af561e285886085371e9 (diff) | |
download | Qt-c41591d57377cd7c520efc93d9c087ad34d2bb6f.zip Qt-c41591d57377cd7c520efc93d9c087ad34d2bb6f.tar.gz Qt-c41591d57377cd7c520efc93d9c087ad34d2bb6f.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/introtodbus.qdoc | 2 | ||||
-rw-r--r-- | doc/src/snippets/code/src_gui_qproxystyle.cpp | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/doc/src/introtodbus.qdoc b/doc/src/introtodbus.qdoc index 1edc6eb..1cd874c 100644 --- a/doc/src/introtodbus.qdoc +++ b/doc/src/introtodbus.qdoc @@ -207,7 +207,7 @@ This feature can be enabled on a per-application basis by setting the \c QDBUS_DEBUG environment variable before running each application. For example, we can enable debugging only for the car in the - \l{Remote Controlled Car Example} by running the controller and the + \l{D-Bus Remote Controlled Car Example} by running the controller and the car in the following way: \snippet doc/src/snippets/code/doc_src_introtodbus.qdoc QDBUS_DEBUG diff --git a/doc/src/snippets/code/src_gui_qproxystyle.cpp b/doc/src/snippets/code/src_gui_qproxystyle.cpp index 7633160..a9c55b3 100644 --- a/doc/src/snippets/code/src_gui_qproxystyle.cpp +++ b/doc/src/snippets/code/src_gui_qproxystyle.cpp @@ -13,3 +13,33 @@ public: }; //! [0] + +//! [1] +#include "textedit.h" +#include <QApplication> +#include <QProxyStyle> + +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 0; + return QProxyStyle::styleHint(hint, option, widget, returnData); + } +}; + +int main(int argc, char **argv) +{ + Q_INIT_RESOURCE(textedit); + + QApplication a(argc, argv); + a.setStyle(new MyProxyStyle); + TextEdit mw; + mw.resize(700, 800); + mw.show(); + //... +} +//! [1] |