summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorElvis Lee <kwangwoong.lee@lge.com>2012-08-03 16:55:08 +0900
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-08-03 11:13:12 +0200
commit6728e205cc3d3ada64fd7e7df1e1e8ee5aa80266 (patch)
tree6fe87fcbfe59d8fd55b447b73ed2a2cc0173fbd9 /examples
parent5b2ffd10e85af5860248ee761255721cb3675b40 (diff)
downloadqtwayland-6728e205cc3d3ada64fd7e7df1e1e8ee5aa80266.tar.gz
Set default background image for QWidgetCompositor
This is helpful for seeing cursor. Change-Id: I1356be8ffb725af303ef4a13503843bbeae0e071 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/qwidget-compositor/main.cpp2
-rw-r--r--examples/qwidget-compositor/qwidget-compositor.pro2
-rw-r--r--examples/qwidget-compositor/qwidget-compositor.qrc5
3 files changed, 8 insertions, 1 deletions
diff --git a/examples/qwidget-compositor/main.cpp b/examples/qwidget-compositor/main.cpp
index adac4cfa..c0214250 100644
--- a/examples/qwidget-compositor/main.cpp
+++ b/examples/qwidget-compositor/main.cpp
@@ -81,7 +81,7 @@ public:
enableSubSurfaceExtension();
setMouseTracking(true);
setRetainedSelectionEnabled(true);
- m_background = QImage(QLatin1String("background.jpg"));
+ m_background = QImage(QLatin1String(":/background.jpg"));
//make sure we get the window id and create the glcontext
//so that clients can successfully initialize egl
winId();
diff --git a/examples/qwidget-compositor/qwidget-compositor.pro b/examples/qwidget-compositor/qwidget-compositor.pro
index 369affbe..688175b9 100644
--- a/examples/qwidget-compositor/qwidget-compositor.pro
+++ b/examples/qwidget-compositor/qwidget-compositor.pro
@@ -15,6 +15,8 @@ SOURCES += \
QT += core-private gui-private widgets widgets-private opengl opengl-private compositor
+RESOURCES += qwidget-compositor.qrc
+
target.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwidget-compositor
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qwidget-compositor.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwidget-compositor
diff --git a/examples/qwidget-compositor/qwidget-compositor.qrc b/examples/qwidget-compositor/qwidget-compositor.qrc
new file mode 100644
index 00000000..20dd10a5
--- /dev/null
+++ b/examples/qwidget-compositor/qwidget-compositor.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file alias="background.jpg">../qml-compositor/background.jpg</file>
+ </qresource>
+</RCC>