QML, Node js and websocket

  • Hi,

    Actually having trouble with websocket in Qml.
    What i want : a nodejs server with a qml client

    My node js server seems to work, because when i instanciate a Websocket in Chrome console it works

    Here is my client

     WebSocket {
                id: secureWebSocket
                url: "ws://localhost:3000"
                onTextMessageReceived: {
                    console.log("\nReceived secure message: ")
                onStatusChanged: if (secureWebSocket.status == WebSocket.Error) {
                                     console.log("Error: " + secureWebSocket.errorString)
                                 } else if (secureWebSocket.status == WebSocket.Open) {
                                     secureWebSocket.sendTextMessage("Hello Secure World")
                                 } else if (secureWebSocket.status == WebSocket.Closed) {
                                     console.log("\nSecure socket closed")
                active: false

    I also added websockets in the .pro file and imported websockets in my main.qml

    The error i get is :

     WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
    qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method

    Thanks :)

  • @the-smaug said in QML, Node js and websocket:

    qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method

    I suggest you do a google search for this error.

  • OpenSSL @the-smaug

  • If you are using a Linux Distro, you have to install qt-at-spi:

    sudo apt-get install at-spi2-core


    sudo apt-get install qt-at-spi

    or something like it to rpm or other distro (Arch/Gentoo/...).

    As the error says: Error retrieving accessibility bus address

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.