diff --git a/examples/websockets/sslechoserver/securesocketclient.qrc b/examples/websockets/sslechoserver/securesocketclient.qrc
new file mode 100644
index 0000000000000000000000000000000000000000..448fa9257bfb3f77c00245fd3c47aeb5771b8f5a
--- /dev/null
+++ b/examples/websockets/sslechoserver/securesocketclient.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file>localhost.cert</file>
+    <file>localhost.key</file>
+</qresource>
+</RCC>
diff --git a/examples/websockets/sslechoserver/sslechoserver.cpp b/examples/websockets/sslechoserver/sslechoserver.cpp
index e87180e2a480dc2af0e3c642497172d06db4ff0c..2849621a08de5e87ba4b92d0285be4e8a021523f 100644
--- a/examples/websockets/sslechoserver/sslechoserver.cpp
+++ b/examples/websockets/sslechoserver/sslechoserver.cpp
@@ -50,8 +50,8 @@ SslEchoServer::SslEchoServer(quint16 port, QObject *parent) :
                                               QWebSocketServer::SecureMode,
                                               this);
     QSslConfiguration sslConfiguration;
-    QFile certFile(QStringLiteral("./localhost.cert"));
-    QFile keyFile(QStringLiteral("./localhost.key"));
+    QFile certFile(QStringLiteral(":/localhost.cert"));
+    QFile keyFile(QStringLiteral(":/localhost.key"));
     certFile.open(QIODevice::ReadOnly);
     keyFile.open(QIODevice::ReadOnly);
     QSslCertificate certificate(&certFile, QSsl::Pem);
diff --git a/examples/websockets/sslechoserver/sslechoserver.pro b/examples/websockets/sslechoserver/sslechoserver.pro
index 26638729a169049452230bd3592f387bf42b35ae..a1a5275a0491bc9eb80abbaa94ba757fa784c14b 100644
--- a/examples/websockets/sslechoserver/sslechoserver.pro
+++ b/examples/websockets/sslechoserver/sslechoserver.pro
@@ -15,3 +15,5 @@ HEADERS += \
     sslechoserver.h
 
 OTHER_FILES += sslechoclient.html
+
+RESOURCES += securesocketclient.qrc