summaryrefslogtreecommitdiffstats
path: root/examples/doc/openreadme.qdoc
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-01-21 10:03:13 +0100
committerKai Koehne <kai.koehne@theqtcompany.com>2015-01-21 10:14:50 +0100
commit711c579ffa053acfe49879960bfb1b1b1b5f4c8b (patch)
treedb9036908d52db1dedf74fe5dd07a9132d7c547d /examples/doc/openreadme.qdoc
parent515b96469d39c8dfd5ba823ecac371414c02e552 (diff)
parent7b584f55c2fee55aabd852aa836d6d8295ee1b22 (diff)
Merge remote-tracking branch 'origin/2.0'
Conflicts: dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri Change-Id: Ia5dd8dfbaa2289f1b167191d6997a5f4340721a2
Diffstat (limited to 'examples/doc/openreadme.qdoc')
-rw-r--r--examples/doc/openreadme.qdoc50
1 files changed, 48 insertions, 2 deletions
diff --git a/examples/doc/openreadme.qdoc b/examples/doc/openreadme.qdoc
index 165caf4e2..be24df084 100644
--- a/examples/doc/openreadme.qdoc
+++ b/examples/doc/openreadme.qdoc
@@ -30,12 +30,58 @@
\ingroup qtifwexamples
\title Open ReadMe Example
- \brief Adding a check box for opening the readme file to the final
- installer page.
+ \brief Using a component script to add a check box for opening the readme
+ file to the final installer page.
+
+ \image qtifw-examples-openreadme.png
+
+ \e{Open ReadMe} illustrates how to use the \c Component() function to add a
+ check box to the installation finished page and to open the readme file if
+ end users select the check box.
\include installerfw-examples-configuring.qdocinc
\quotefile openreadme/config/config.xml
+ \include installerfw-examples-packaging.qdocinc
+
+ \list
+ \li The \c <Default> section is set to \c true to preselect the
+ component in the installer.
+ \li The \c <Script> section specifies the file name of the JavaScript
+ file that is loaded to perform operations.
+ \li The \c <UserInterfaces> section specifies the file name of the
+ installer page (.ui file) to use.
+ \endlist
+
+ \quotefile openreadme/packages/or.qtproject.ifw.example.openreadme/meta/package.xml
+
+ \section1 Opening Files After Installation
+
+ In installscript.qs, we use the \c Component() function to connect to the
+ \c installationFinishedPageIsShown signal when the installation is complete
+ and to the \c installationFinished signal when the end users click
+ \uicontrol Finish (\uicontrol Done on OS X):
+
+ \quotefromfile openreadme/packages/or.qtproject.ifw.example.openreadme/meta/installscript.qs
+ \skipto Component()
+ \printuntil }
+
+ We call the component::createOperations() function to override the default
+ method for creating operations:
+
+ \printuntil }
+
+ If the installation is successful, we call the installer::addWizardPageItem()
+ function to replace the last installer page with a custom page that contains
+ the \uicontrol {OpenReadMe} check box:
+
+ \printuntil /^\}/
+
+ We set the \c readMeCheckBox to \c checked by default and use the
+ QDesktopServices::openURL() function to open the readme file:
+
+ \printuntil /^\}/
+
\include installerfw-examples-generating.qdocinc
*/