diff options
author | Keith Isdale <keith.isdale@nokia.com> | 2011-08-18 04:25:27 (GMT) |
---|---|---|
committer | Keith Isdale <keith.isdale@nokia.com> | 2011-08-18 04:40:20 (GMT) |
commit | c2e8af87b10eaf57d397d467a79fcc24fa23bacf (patch) | |
tree | 747a314ebc98a08ce21ce7efef97434c557addf9 /doc | |
parent | 4a64a943a7f351c41c49784ea10a229f87a7476f (diff) | |
download | Qt-c2e8af87b10eaf57d397d467a79fcc24fa23bacf.zip Qt-c2e8af87b10eaf57d397d467a79fcc24fa23bacf.tar.gz Qt-c2e8af87b10eaf57d397d467a79fcc24fa23bacf.tar.bz2 |
Improve documentation for QDeclarativeView::setSource()
Add reference to tutorial on setting source file for QDeclarativeView.
Make use of compiled example code that demonstrate using Qt Resources in
calls to QDeclarativeView::setSource() .
Task-number: QTBUG-20985
Reviewed-by: Alan Alpert
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/network.qdoc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc index cb83542..0ebf8ae 100644 --- a/doc/src/declarative/network.qdoc +++ b/doc/src/declarative/network.qdoc @@ -134,10 +134,9 @@ One of the URL schemes built into Qt is the "qrc" scheme. This allows content to the executable using \l{The Qt Resource System}. Using this, an executable can reference QML content that is compiled into the executable: -\code - QDeclarativeView *canvas = new QDeclarativeView; - canvas->setUrl(QUrl("qrc:/dial.qml")); -\endcode +\quotefromfile snippets/declarative/qtbinding/resources/main.cpp +\skipto view +\printuntil setSource The content itself can then use relative URLs, and so be transparently unaware that the content is compiled into the executable. |