diff options
author | David Boddie <david.boddie@nokia.com> | 2011-02-09 17:03:01 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-02-09 17:03:01 (GMT) |
commit | 1a7d04376d2b7ecbae69d14fb0d124e47507961d (patch) | |
tree | 1c96aeb1a26b96d068d249422806567226565dd3 /doc/src/examples/activeqt | |
parent | fb6e03e41aa79a4a459eeb21076ffd08541914ab (diff) | |
download | Qt-1a7d04376d2b7ecbae69d14fb0d124e47507961d.zip Qt-1a7d04376d2b7ecbae69d14fb0d124e47507961d.tar.gz Qt-1a7d04376d2b7ecbae69d14fb0d124e47507961d.tar.bz2 |
Doc: Snippet quoting and other documentation fixes.
Diffstat (limited to 'doc/src/examples/activeqt')
-rw-r--r-- | doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc | 39 | ||||
-rw-r--r-- | doc/src/examples/activeqt/hierarchy-demo.qdocinc | 2 | ||||
-rw-r--r-- | doc/src/examples/activeqt/hierarchy.qdoc | 2 |
3 files changed, 40 insertions, 3 deletions
diff --git a/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc new file mode 100644 index 0000000..5df3224 --- /dev/null +++ b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc @@ -0,0 +1,39 @@ +<script language="javascript"> +function createSubWidget( form ) +{ + ParentWidget.createSubWidget( form.nameEdit.value ); +} + +function renameSubWidget( form ) +{ + var SubWidget = ParentWidget.subWidget( form.nameEdit.value ); + if ( !SubWidget ) { + alert( "No such widget " + form.nameEdit.value + "!" ); + return; + } + SubWidget.label = form.labelEdit.value; + form.nameEdit.value = SubWidget.label; +} + +function setFont( form ) +{ + ParentWidget.font = form.fontEdit.value; +} +</script> + +<p> +This widget can have many children! +</p> +<object ID="ParentWidget" CLASSID="CLSID:d574a747-8016-46db-a07c-b2b4854ee75c" +CODEBASE="http://qt.nokia.com/demos/hierarchy.cab"> +[Object not available! Did you forget to build and register the server?] +</object><br /> +<form> +<input type="edit" ID="nameEdit" value="<enter object name>" /> +<input type="button" value="Create" onClick="createSubWidget(this.form)" /> +<input type="edit" ID="labelEdit" /> +<input type="button" value="Rename" onClick="renameSubWidget(this.form)" /> +<br /> +<input type="edit" ID="fontEdit" value="MS Sans Serif" /> +<input type="button" value = "Set Font" onClick="setFont(this.form)" /> +</form> diff --git a/doc/src/examples/activeqt/hierarchy-demo.qdocinc b/doc/src/examples/activeqt/hierarchy-demo.qdocinc index e7cb56e..86bfd87 100644 --- a/doc/src/examples/activeqt/hierarchy-demo.qdocinc +++ b/doc/src/examples/activeqt/hierarchy-demo.qdocinc @@ -1,5 +1,4 @@ \raw HTML -//! [0] <script language="javascript"> function createSubWidget( form ) { @@ -39,5 +38,4 @@ CODEBASE="http://qt.nokia.com/demos/hierarchy.cab"> <input type="edit" ID="fontEdit" value="MS Sans Serif" /> <input type="button" value = "Set Font" onClick="setFont(this.form)" /> </form> -//! [0] \endraw diff --git a/doc/src/examples/activeqt/hierarchy.qdoc b/doc/src/examples/activeqt/hierarchy.qdoc index eb6cc71..8d14b68 100644 --- a/doc/src/examples/activeqt/hierarchy.qdoc +++ b/doc/src/examples/activeqt/hierarchy.qdoc @@ -84,5 +84,5 @@ your WebBrowser to support ActiveX controls, and scripting to be enabled. - \snippet examples/activeqt/hierarchy-demo.qdocinc 0 + \quotefile examples/activeqt/hierarchy-demo-snippet.qdoc */ |