Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61515

QWebChannel: Sending custom datatypes as signal parameters

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: 5.9.0
    • Fix Version/s: None
    • Component/s: WebChannel
    • Labels:
      None

      Description

      Hi!

      I want to send a signal from server side to javascript client, which has a custom datatype in its signature. I define a struct and register it as a qt metatype. However, after I emit signal passing some value, I get null Object on the client side. 

      I have attached a modified webchannel example. If you run diff, you'll see, that I have changed newMessage signal signature to pass time, user and message as struct both in server and client code.

      Can you, please, tell, if this is supposed to work? Or am I missing something?

      Thank you.

      P.S. qwebchannel.js is still missing from distributives.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            milianw Milian Wolff
            Reporter:
            danilshkodin danilshkodin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes