Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several questions about QMLWeb architecture. #463

Open
rafal-tarnow opened this issue Feb 7, 2024 · 1 comment
Open

Several questions about QMLWeb architecture. #463

rafal-tarnow opened this issue Feb 7, 2024 · 1 comment

Comments

@rafal-tarnow
Copy link

rafal-tarnow commented Feb 7, 2024

Hi, I'm very interested in the project (it's a pity it's not actively developed). I have a question regarding the rendering backend. What do you use in the project? Does QmlWeb use canvas for rendering buttons, images, etc.? Or is it done differently? Another thing, would transitioning from a rendering backend to Three.js (based on WebGL) be a challenging task for this project? (I am a C/C++ programmer, I have very little knowledge of web technologies.)

@rafal-tarnow rafal-tarnow changed the title Several questions about WebQML architecture. Several questions about QMLWeb architecture. Feb 9, 2024
@Plaristote
Copy link
Member

There is no rendering backend ! We took the path of least resistance, which was probably best in terms of performances as well. QMLWeb is just plain DOM, CSS and JavaScript. No canvas involved. QMLWeb doesn't really render stuff: rather it serves as a layer between QML and the DOM API.

The history of the project is important there. Two things have changed since the beginnings:

  • QtQuick.Controls was replaced with QtQuick.Controls 2, which had a more complete approach. There were many equivalent between Controls 1 and what the DOM API provides. Controls 2 took things a step forward, and I've been unable to implement most of it: it's a huge amount of work compared to what Controls 1 would've required.

  • CSS has evolved plenty, with the introduction of flex, grid, and animations. Back when this project started, these things were hard to do using the technologies natively provided by the web browser. You'd need a lot of JavaScript to implement such behaviours. QMLWeb was a way to implement such features easily in the browser using an already defined language.

Basically, QMLWeb is a lot less relevant than it was 10 years ago, both from the perspective of compatibility with QML and providing features that web browsers don't. It could still be relevant, had we a complete implementation of Controls 2... but our team never got to that. I made an attempt at it a couple of years ago, on my own, but it's a lot of work, and without eyes behind my back to check out my work and discuss my decisions, I feel like I might be wasting a lot of time over something that might never be worth it.

Feel free to ask anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants