News for hackers. Stuff that matters.
Re:Qt 6.4 by firecraker on Thursday September 29, 2022 @08:04AM (#33019395)
Qt in the browser sounds cool.. but feels reminiscent of shockwave..
Re:Qt 6.4 by pjmlp on Thursday September 29, 2022 @08:51AM (#33019864)
While some people were too busy cheering the death of plugins, they were being bought back to life thanks to the rejuvenating powers of WebAssembly and WebGL.

All of them already have some kind of support in WebAssembly.

Re:Qt 6.4 by bobajeff on Thursday September 29, 2022 @10:09AM (#33020841)
Still, overall better than the situation of having to install a plugin that may or may not be available or working fully on your system. Plus security concerns of running sometimes obscure binaries on your system to access web content.
Re:Qt 6.4 by pjmlp on Thursday September 29, 2022 @10:35AM (#33021265)
You can compile heartbleed to WebAssembly, and there are ways to exploit memory corruption to change observable behaviour.
Re:Qt 6.4 by bobajeff on Thursday September 29, 2022 @11:24AM (#33021983)
I'm aware it's not impossible to exploit the current plug-in free browsers we have now. It's still objectively better than before.

Not that I'm satisfied with the current state of browsers mind you. I just think not being forced to install someone's binary blob to look at web content is a net benefit.

Re:Qt 6.4 by pjmlp on Thursday September 29, 2022 @11:28AM (#33022034)
Except you can't disable WebAssembly, and you can't control how a SPA is implemented, see Figma for example.

Now you can enjoy Flash like ads using WebAssembly + WebGL, making it all a Phyrric victory.

Re:Qt 6.4 by ranger_danger on Thursday September 29, 2022 @12:37PM (#33023160)
WebAssembly can absolutely be disabled:

Chromium-based: --js-flags=--noexpose_wasm

Firefox-based: about:config javascript.options.wasm = false

Re:Qt 6.4 by pjmlp on Thursday September 29, 2022 @01:26PM (#33024159)
Great now explain that to granny on her phone.
Re:Qt 6.4 by tredre3 on Thursday September 29, 2022 @09:42PM (#33029838)
Seems like you're moving the goalposts...

Webassembly is clearly an improvement over the old plugins. For one thing it's a full virtual machine and was designed with sandboxing in mind.

Re:Qt 6.4 by pjmlp on Friday September 30, 2022 @01:45AM (#33031409)
Not at all, I say it can be disabled and stand by it.

Those browser flags aren't something Joe and Jane users are capable to be aware of, can disappear at any time anyway, and are not a thing on mobile devices.

A sandboxing that isn't bullet proof and can still be exploited by triggering memory corruption on the linear memory segment, thus changing decisions based on the data contents.

Re:Qt 6.4 by ranger_danger on Sunday October 02, 2022 @08:49AM (#33055480)
Joe and Jane also don't know or care what WebAssembly is.
Re:Qt 6.4 by 323 on Thursday September 29, 2022 @08:37AM (#33019708)
It's inevitable.

The only way for Qt to compete with Electron is to become Electron.

Re:Qt 6.4 by Jenk on Thursday September 29, 2022 @08:49AM (#33019839)
That feels like to opposite, though. Electron brought the browser to offline/"native" apps. It literally packaged webkit in a way for web tech to be used as a desktop app, whilst Qt in the browser (and Shockwave, Java Applets, ActiveX et al) were bringing the desktop to the browser.
Re:Qt 6.4 by kuschku on Thursday September 29, 2022 @09:54AM (#33020647)
Electron brings non-native content to the desktop. Qt in the browser brings non-native content to the web.

Now we can have broken accessibility, usability, broken theming, and bad integration on both platforms, yay!

Re:Qt 6.4 by IshKebab on Thursday September 29, 2022 @08:50AM (#33019850)
Yeah I don't think anyone would really choose to write a new web app with Qt. I assume the target market is people that want to port their existing Qt code to the web. It could also be useful for demoing Qt apps.
Re:Qt 6.4 by jcelerier on Thursday September 29, 2022 @09:03AM (#33020011)
Yep, I do it with https://ossia.io (https://ossia.io/score-web) to make the occasional demo ; it's pretty alpha and drag'n'drop still seems to kill it but every Qt release has made it better without me having to do anything.. looking forward to updating!
Re:Qt 6.4 by qutierust on Thursday September 29, 2022 @10:55AM (#33021593)
How do you do it? I didn't know qt web was a thing? I remember I heard about one project but that was gpl i think
Re:Qt 6.4 by toyg on Thursday September 29, 2022 @12:01PM (#33022546)
At one point Nokia pushed the idea that you would write Qt apps to run on their cloud; they had a few actual customers doing it too. I don't know if the current owners kept going with the concept.

It makes sense, from the perspective of shops who invested heavily in upskilling on Qt, to reuse the knowledge to build web apps.

Re:Qt 6.4 by jcelerier on Thursday September 29, 2022 @11:06AM (#33021730)
ossia score is GPLv3 itself

regarding the how.. Qt provides a CMake wrapper which sets up the relevant flags automatically so with CMake/Qt projects it pretty much just works. Here's my build scripts:

- https://github.com/ossia/score/blob/master/ci/wasm.deps.sh

- https://github.com/ossia/score/blob/master/ci/wasm.build.sh

Re:Qt 6.4 by llornkcor on Thursday September 29, 2022 @04:33PM (#33026761)
Re:Qt 6.4 by llornkcor on Thursday September 29, 2022 @04:32PM (#33026750)
drag and drop requires configuring your app with asyncify option. https://doc-snapshots.qt.io/qt6-6.4/wasm.html#asyncify
Re:Qt 6.4 by jcelerier on Thursday September 29, 2022 @05:06PM (#33027224)
I think this is how I do it (https://github.com/ossia/score/blob/master/ci/wasm.build.sh) but it still stops working after some time
Re:Qt 6.4 by aljgz on Thursday September 29, 2022 @09:03AM (#33020019)
Don't underestimate people's reluctance to learn new stacks.
Re:Qt 6.4 by ravenstine on Thursday September 29, 2022 @09:06AM (#33020048)
I think the better use case for having Qt in the browser is if a web app could benefit from sharing code with a mobile or desktop Qt project. Other than that, yeah, I'm not sure why anyone would use Qt for web apps besides preference.
Re:Qt 6.4 by llornkcor on Thursday September 29, 2022 @04:35PM (#33026790)
Easier testing and deployment. Develop and test one platform. Deployment is a url.