Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML, Node js and websocket
Forum Updated to NodeBB v4.3 + New Features

QML, Node js and websocket

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 4 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    the-smaug
    wrote on 9 May 2017, 13:59 last edited by
    #1

    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 :)

    E 1 Reply Last reply 9 May 2017, 14:18
    0
    • T the-smaug
      9 May 2017, 13:59

      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 :)

      E Offline
      E Offline
      Eeli K
      wrote on 9 May 2017, 14:18 last edited by
      #2

      @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.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cfdev
        wrote on 10 May 2017, 13:19 last edited by
        #3

        OpenSSL @the-smaug

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Leandro
          wrote on 10 May 2017, 14:21 last edited by Leandro 5 Oct 2017, 14:24
          #4

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

          sudo apt-get install at-spi2-core

          or

          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

          1 Reply Last reply
          0

          1/4

          9 May 2017, 13:59

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved