1

I'm developing an Ubuntu Touch application which communicates with a server using WebSockets. Qt offers its own API since version 5.3, which can be used from a QML file by adding import QtWebSockets 1.0. However, despite having Qt 5.4 and the libqt5websockets5 package installed on a 15.04 emulator image, I get the following error:

/path/to/Main.qml:2 module "QtWebSockets" is not installed

Is it possible to use WebSockets somehow with Ubuntu Touch's Qt?

Xerz
  • 4,591

1 Answers1

2

Try import Qt.WebSockets 1.0. This is the module name given in the qmldir file.

The QML Documentation says that the QtWebSockets name was introduced in Qt 5.5; prior to that, the namespace was Qt.WebSockets. Apparently, the old namespace is still active in 5.5, so I'd use it for the time being.