summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/util/qmlview.cpp10
-rw-r--r--src/declarative/util/qmlview.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp
index f932e4a..14f8279 100644
--- a/src/declarative/util/qmlview.cpp
+++ b/src/declarative/util/qmlview.cpp
@@ -235,6 +235,16 @@ void QmlView::setUrl(const QUrl& url)
}
/*!
+ Returns the source URL, if set.
+
+ \sa setUrl()
+ */
+QUrl QmlView::url() const
+{
+ return d->source;
+}
+
+/*!
Sets the source to the URL from the \a filename, and sets
the QML string to \a qml.
*/
diff --git a/src/declarative/util/qmlview.h b/src/declarative/util/qmlview.h
index b54101f..faf2564 100644
--- a/src/declarative/util/qmlview.h
+++ b/src/declarative/util/qmlview.h
@@ -70,6 +70,7 @@ public:
virtual ~QmlView();
void setUrl(const QUrl&);
+ QUrl url() const;
void setQml(const QString &qml, const QString &filename=QString());
QString qml() const;
QmlEngine* engine();