Live data from Hacker News

Qt for WebAssembly Technology Preview

blog.qt.io

151–160 of 196 posts

Re: Qt for WebAssembly Technology Preview

#151

Earlier quoted context omitted.

Nobody optimizes and recompiles the libraries anymore to configure out the unnecessary parts. The mechanisms are still there but the practice died when Qt stopped focusing on embedded targets.

Qt does focus very much on embedded targets: http://blog.qt.io/blog/2016/08/18/introducing-the-qt-lite-pr... Embedded is the biggest market for Qt right now.

A few notes:

1) Qt Widgets development stopped with 5.0. I had bugs filed on the embedded Linux targets and was told "sorry, these will never be fixed".

2) #1 means that Qt wants you to use QML. I need to run a Javascript engine on my target? Note in the comments of that blog post that they hope to run on an A7 (or really fast M7)...someday.

2b) ...And if they do run on a lower end platform, you still need a POSIX O/S. uCLinux is not a great option on M3/M4 CPUs and keeping the binding dynamic on those cores to stay LGPL compliant is extremely difficult.

3) QML bindings are a pain in the ass, especially when you're trying to put a UI on legacy code.

4) Most crucial: Qt Lite and QtDC are commercial products only.

So, in my opinion, embedded is still a 2nd class player. Or, I could clarify further: low end embedded is a 2nd class player. If you're working on automotive HMI/IVI? They'd love your business.

Re: Qt for WebAssembly Technology Preview

#152

Earlier quoted context omitted.

The licensing bit is really trivial to summarize: It's LGPLv3. Formerly v2, so now it can't be used for free in some applications where it formerly could. You can absolutely use it for free in any project, as long as you conform to LGPLv3. Regarding JS: You're not supposed to write more than glue logic in JS - well, that's the practical experience. For some reason, the Qt company recommends more JS use than that.

> You can absolutely use it for free in any project, as long as you conform to LGPLv3. So you're saying there are projects where I cannot use Qt? The fact is, there exists projects that do not have the option of using Qt without paying for expensive licensing. Such projects should at least consider using Electron which might have significant non-technical advantages for them. It is cool that what many consider to be…

> Such projects should at least consider using Electron which might have significant non-technical advantages for them.

Electron uses components that are under LGPL (Chromium for instance) so it's basically exactly the same license questions than with Qt.

Re: Qt for WebAssembly Technology Preview

#153
post #148
post #133

Earlier quoted context omitted.

Well I cannot see what they run on their servers, so it is anyone's guess. At least with native code I can check what is on my hard disk. And given my experience, it is hardly the case any company outside the big SV ones or whose main business is unrelated to software, that actually bothers to contribute anything back.

the only widely used license that i know of that would get violated by this kind of use (i think) is the AGPL.

It is not only about violating licenses, rather leeching whatever software they feel like it, without give a cent back.

And there is no way to validate that.

Re: Qt for WebAssembly Technology Preview

#154
post #29

Earlier quoted context omitted.

WebAssembly is binary packed bytecode and generally takes much less space than UTF-8 JavaScript source files.

Hello world in Qt is 25MB as a demonstration of 'lightweight' Qt.

uh ? I have a large Qt / boost app (300kloc) that I compiled with Qt/WASM and the resulting .js is less than 20 megabytes.

Re: Qt for WebAssembly Technology Preview

#155
post #153
post #148

Earlier quoted context omitted.

the only widely used license that i know of that would get violated by this kind of use (i think) is the AGPL.

It is not only about violating licenses, rather leeching whatever software they feel like it, without give a cent back. And there is no way to validate that.

i would assume they are not contributing but if i wanted to find out if they did, i'd ask them. should be fairly easy to validate if you know what they're contributing to.

while i agree with your point about this being sub-optimal for both software-development and free software as a whole, i think it is a separate issue.

Re: Qt for WebAssembly Technology Preview

#156

Earlier quoted context omitted.

I'm not sure I buy that, are you saying that the only reason that Qt hasn't completely taken over writing native software on (even desktop! not to mention mobile where Qt also works), is a marketing problem? I would argue that Qt's problem is: * Licensing is expensive (look it up, you can't just use it for free for large-scale commercial projects, contrary to what many people believe) * Getting started with Qt is pai…

You can totally use it for free in large scale commercial projects. Just link with it dynamically. Deployment is a little bit of a pain but they actually provide software to help - macdeployqt and windeployqt bundle everything up into a dmg or a zip. You aren't forced to use QML. I kind of hate it and QtWidgets are much more mature - I just use those. Sure maybe they aren't being developed so much but they're still m…

>You can totally use it for free in large scale commercial projects. Just link with it dynamically.

Can anyone explain why it is free to use if you link with dynamically, but not statically? (I've seen this point come up a few times in discussions about Qt here on HN.) I know what dynamic and static linking mean, but not clear about the connection to free vs. paid Qt use. Is it something obvious that I'm missing? Only thing I can think of (admit I didn't think a lot about it yet) is that if you use it for free with dynamic linking, deployment is more of an issue, vs. just shipping a self-contained statically linked app.

Thanks in advance.

Re: Qt for WebAssembly Technology Preview

#157
post #87

Earlier quoted context omitted.

Having used QML in the past, its made the most sense to me out of all the UI/Animation setups I have ever used. This sounds amazing

I've used it a fair bit and it gets very messy very quickly. It pretty much encourages spaghetti code. Also it is very incomplete. For example there's no way to do custom widgets that draw text (e.g. a graph). There's no good text area widget (there is one but it is extremely limited - you couldn't use it for a log output for example). Plain QtWidgets is way way better on every level except animation and styling. And…

It definitely can get messy, but there are some very easy ways to keep your project well structured.

1. Refactor out to separate components a lot.

2. Use the .ui.qml and .qml code behind pattern to separate UI from code.

3. Use singleton QtObjects to create abstract classes that contain any non-UX behavior.

As for graphing, the built in components work pretty well:

https://doc.qt.io/qt-5.10/qtcharts-index.html

As far as QML widgets go, they have improved greatly since they released Quick Controls 2 (a rewrite of the initial set of controls).

https://doc.qt.io/qt-5.10/qtquickcontrols2-index.html

Re: Qt for WebAssembly Technology Preview

#158
post #26

This (assuming it's Qt Quick) opens the door for a competitor to HTML for web apps.

Except this looks like it would be a big download, wouldn't it? And how would this UI interact with assistive applications like screen readers?

According to my chrome network tab cnn.com now comes to 1.7 megabyte. Without ad blocking, over double that.

Let's say 20% of that is images (it's actually less) ... it is not a problem to fit quite an extensive C++ program in that.

Re: Qt for WebAssembly Technology Preview

#159
post #137

Earlier quoted context omitted.

I wouldn't be surprised to see WebAssembly only applications once WebAssembly matures and can "stand on it's own free" honestly. JavaScript for sure will hold dominance for many, many years however.

WebAssembly can not manipulate the DOM though no? Web applications got popular also because creating UIs with HTML and CSS is easy.

It probably will be able to do this in the future.

Re: Qt for WebAssembly Technology Preview

#160

Unfortunately, this port seems to lack accessibility for blind people and others that require assistive technology. My conclusion is based on the demos linked elsewhere on this thread. [0] I have no idea how to make a conventional GUI toolkit accessible with ARIA, but I hope the Qt developers figure it out. Edit: Forgot to mention that I tested on Windows with a screen reader and Chrome. [0]: https://msorvig.github.i…

Accessibility like that likely won't be possible, as the only way to get accessibility in browsers is with the DOM, which is very limited in functionality. If you wish to have accessible applications, you'll need to run the native applications instead.

What if some application developers don't make a native version available? Accessibility should be the default on all platforms, not something that application developers have to go out of their way to support.
Post reply on HN