summaryrefslogtreecommitdiffstats
path: root/examples/qwidget-compositor
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/qwidget-compositor
parent5b2ffd10e85af5860248ee761255721cb3675b40 (diff)
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/qwidget-compositor')
-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 adac4cfa0..c02142502 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 369affbe6..688175b9f 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 000000000..20dd10a53
--- /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>