dibok
Support for Qt QML JavaScript?
Hi,
I’m trying to use phoenix.js in my Qt QML project which has it’s own buildin JavaScript engine. Problem is that (what I googled so far) that this engine has cut out WebSocket class, because QML has its own WebSocket component. When I import phoenix.js library and try to create Socket then I get error:
TypeError: Cannot read property 'WebSocket' of undefined
Problem is probably in this line:
this.transport = opts.transport || global.WebSocket || LongPoll;
So in theory, it is possible to inject QML WebSocket{} engine in phoenix.js by Qt.createQmlObject() or Qt.createComponent(). But this probably require change names of original WebSocket’s method names and signals etc. in phoenix.js file.
Did anyone tried this? I’m still newbie in QML and JavaScript, as C++ and Qt Widgetsets programmer, I’m trying to make new project using QML framework so I’m not such experienced to do it by my self.
Regards
First Post!
thomas.fortes
Popular in Proposals: Ideas
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








