summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/doc_src_plugins-howto.qdoc
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2011-02-23 20:32:21 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2011-02-23 20:32:21 (GMT)
commitc881e33e7e510204fabd061dac08a00b10b432fb (patch)
treeb5a5210eef8d309a17aca7d20b457879b584913f /doc/src/snippets/code/doc_src_plugins-howto.qdoc
parent309c48a70b46678ef92da441fcc2dc96ceb8fcf3 (diff)
parent3c982b5d214cc7a37ace1d956ac8fb0b9a281722 (diff)
downloadQt-c881e33e7e510204fabd061dac08a00b10b432fb.zip
Qt-c881e33e7e510204fabd061dac08a00b10b432fb.tar.gz
Qt-c881e33e7e510204fabd061dac08a00b10b432fb.tar.bz2
Merge branch '4.7' into mimir
Diffstat (limited to 'doc/src/snippets/code/doc_src_plugins-howto.qdoc')
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.qdoc65
1 files changed, 1 insertions, 64 deletions
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.qdoc b/doc/src/snippets/code/doc_src_plugins-howto.qdoc
index fa883ba..b03dfed 100644
--- a/doc/src/snippets/code/doc_src_plugins-howto.qdoc
+++ b/doc/src/snippets/code/doc_src_plugins-howto.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -38,69 +38,6 @@
**
****************************************************************************/
-//! [0]
-class MyStylePlugin : public QStylePlugin
-{
-public:
- QStringList keys() const;
- QStyle *create(const QString &key);
-};
-//! [0]
-
-
-//! [1]
-#include "mystyleplugin.h"
-
-QStringList MyStylePlugin::keys() const
-{
- return QStringList() << "MyStyle";
-}
-
-QStyle *MyStylePlugin::create(const QString &key)
-{
- if (key.toLower() == "mystyle")
- return new MyStyle;
- return 0;
-}
-
-Q_EXPORT_PLUGIN2(pnp_mystyleplugin, MyStylePlugin)
-//! [1]
-
-
-//! [2]
-QApplication::setStyle(QStyleFactory::create("MyStyle"));
-//! [2]
-
-
-//! [3]
-CONFIG += release
-//! [3]
-
-
-//! [4]
-#include <QApplication>
-#include <QtPlugin>
-
-Q_IMPORT_PLUGIN(qjpeg)
-Q_IMPORT_PLUGIN(qgif)
-Q_IMPORT_PLUGIN(qkrcodecs)
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- ...
- return app.exec();
-}
-//! [4]
-
-
-//! [5]
-QTPLUGIN += qjpeg \
- qgif \
- qkrcodecs
-//! [5]
-
-
//! [6]
HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.debug
HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.false