summaryrefslogtreecommitdiff
path: root/examples/webkitqml/youtubeview
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webkitqml/youtubeview')
-rw-r--r--examples/webkitqml/youtubeview/content/YouTubeDialog.qml4
-rw-r--r--examples/webkitqml/youtubeview/youtubeview.pro3
-rw-r--r--examples/webkitqml/youtubeview/youtubeview.qml16
-rw-r--r--examples/webkitqml/youtubeview/youtubeview.qrc7
4 files changed, 20 insertions, 10 deletions
diff --git a/examples/webkitqml/youtubeview/content/YouTubeDialog.qml b/examples/webkitqml/youtubeview/content/YouTubeDialog.qml
index b02400e..21bdc40 100644
--- a/examples/webkitqml/youtubeview/content/YouTubeDialog.qml
+++ b/examples/webkitqml/youtubeview/content/YouTubeDialog.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import "../../shared"
+import "qrc:/shared" as Shared
Rectangle {
id: container
@@ -77,7 +77,7 @@ Rectangle {
Component {
id: delegate
- Button {
+ Shared.Button {
buttonWidth: 200
text: name
onClicked: presetClicked(name)
diff --git a/examples/webkitqml/youtubeview/youtubeview.pro b/examples/webkitqml/youtubeview/youtubeview.pro
index cdc71e9..b67072f 100644
--- a/examples/webkitqml/youtubeview/youtubeview.pro
+++ b/examples/webkitqml/youtubeview/youtubeview.pro
@@ -14,3 +14,6 @@ INSTALLS += target qml
OTHER_FILES += \
player.html
+
+RESOURCES += youtubeview.qrc \
+ ../shared/shared.qrc
diff --git a/examples/webkitqml/youtubeview/youtubeview.qml b/examples/webkitqml/youtubeview/youtubeview.qml
index b002319..16873d6 100644
--- a/examples/webkitqml/youtubeview/youtubeview.qml
+++ b/examples/webkitqml/youtubeview/youtubeview.qml
@@ -41,8 +41,8 @@
import QtQuick 2.0
import QtWebKit 3.0
import QtQuick.XmlListModel 2.0
-import "content"
-import "../shared"
+import "qrc:/shared" as Shared
+import "qrc:/content" as Content
Rectangle {
id: container
@@ -77,7 +77,7 @@ Rectangle {
anchors.fill: parent
opacity: 0
- url: "content/player.html?" + currentVideo.vId
+ url: "qrc:///content/player.html?" + currentVideo.vId
Behavior on opacity { NumberAnimation { duration: 200 } }
@@ -105,7 +105,7 @@ Rectangle {
}
}
- YouTubeDialog {
+ Content.YouTubeDialog {
id: presetDialog
anchors.fill: parent
visible: false
@@ -190,7 +190,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
width: height
height: visible ? listView.contentItem.height : 0
- Image { anchors.centerIn: parent; width: 50; height: 50; source: "../shared/images/less.png" }
+ Image { anchors.centerIn: parent; width: 50; height: 50; source: "qrc:/shared/images/less.png" }
MouseArea {
anchors.fill: parent
onClicked: model.requestLess()
@@ -205,7 +205,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
width: height
height: visible ? listView.contentItem.height : 0
- Image { anchors.centerIn: parent; width: 50; height: 50; source: "../shared/images/more.png" }
+ Image { anchors.centerIn: parent; width: 50; height: 50; source: "qrc:/shared/images/more.png" }
MouseArea {
anchors.fill: parent
onClicked: model.requestMore()
@@ -240,7 +240,7 @@ Rectangle {
}
}
- LoadIndicator {
+ Shared.LoadIndicator {
anchors.fill: parent
color: "black"
running: panel.state == "list" && model.status != XmlListModel.Ready
@@ -308,7 +308,7 @@ Rectangle {
}
}
- Button {
+ Shared.Button {
id: button
buttonHeight: container.padding
buttonWidth: container.width
diff --git a/examples/webkitqml/youtubeview/youtubeview.qrc b/examples/webkitqml/youtubeview/youtubeview.qrc
new file mode 100644
index 0000000..1440b31
--- /dev/null
+++ b/examples/webkitqml/youtubeview/youtubeview.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>content/YouTubeDialog.qml</file>
+ <file>content/player.html</file>
+ <file>youtubeview.qml</file>
+ </qresource>
+</RCC>