Announcement

Collapse
No announcement yet.

QML Online Now Hosted By The KDE Project For Qt/QML On The Web

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • QML Online Now Hosted By The KDE Project For Qt/QML On The Web

    Phoronix: QML Online Now Hosted By The KDE Project For Qt/QML On The Web

    QML Online is a Qt/QML adaptation for the web powered by EmScripten / WebAssembly...

    http://www.phoronix.com/scan.php?pag...line-Under-KDE

  • #2
    QML... "like HTML and CSS, just much worse". At least that's my conclusion after working with QML for a few months. I honestly wonder where Qt got its good reputation from. No wonder everyone is still using the classic Qt Widgets. If you think of starting a new project and trying QML... please don't.

    Comment


    • #3
      Originally posted by brent View Post
      QML... "like HTML and CSS, just much worse". At least that's my conclusion after working with QML for a few months. I honestly wonder where Qt got its good reputation from. No wonder everyone is still using the classic Qt Widgets. If you think of starting a new project and trying QML... please don't.
      Are you sure you gave QML a fair chance? I haven't worked with it, but a friend of mine did/does and is pretty hyped up about it.

      Comment


      • #4
        Originally posted by bug77 View Post

        Are you sure you gave QML a fair chance? I haven't worked with it, but a friend of mine did/does and is pretty hyped up about it.
        Yes, absolutely. I even started rewriting my code according to best practices cobbled together from other projects.

        As far as QML itself is considered, I can't really put my finger on it, it just feels like a badly designed DSL. You have to mix structure and style of your UI (by design!). HTML has a dedicated styling language (CSS), QML doesn't, and it's clearly missing. Your code is going to be much more messy than a modern web application project. And the tooling sucks, even Qt Designer cannot properly handle non-trivial QML code and debugging QML is complicated and limited.

        The core of QML is of course layout, and that's pretty messy too. Again, can't put my finger on it, but the tools available are less intuitive and less powerful than what you get in HTML/CSS. There are often different ways to apparently achieve the same thing, but there are differences depending on context. In a complicated nested layout I've seen weird stuff happen that I had to hack around. My fault? Probably. But given how confusing QML's layout system is, this is no surprise.

        Then there's components... there are two sets of component libraries (Quick Controls 1 and 2) and they are competing. Quick Controls 2 is the modern and maintained one, but it's not feature complete. Want a tree view? Tough luck, Quick Controls 2 doesn't have one. There's one in Quick Controls 1, but that doesn't help because you can't really embed it sanely in your Quick Controls 2 based app.

        However, where it gets really bad is interaction with C++ code. It's an unholy mess. There are a bunch of different methods to interact and it's often not clear which one should be preferred and offers the best trade-off between performance, type safety and easy of use. You generally need to write a lot of code, even for basic data binding. In the best case, this only slows you down, in the worst case, there will be bugs. Lots of them.

        Overall, it seems like QML was designed with the idea of writing apps largely in QML and JavaScript with a very slim backend, but the tooling for that simply doesn't exist, so that's a probably a bad idea, too. Tooling support for JavaScript in QML feels like a throwback to 2005 compared to contemporary web development.

        Comment


        • #5
          Originally posted by brent View Post
          QML... "like HTML and CSS, just much worse". At least that's my conclusion after working with QML for a few months. I honestly wonder where Qt got its good reputation from. No wonder everyone is still using the classic Qt Widgets. If you think of starting a new project and trying QML... please don't.
          It has it's benefits for desktop apps. That includes over Qt Widgets, and definitely over HTML/CSS if you'd use CEF like Steam or Electron apps do (there are both advantages/disadvantages to it, where the disadvantages are well known by users). Ecosystem wise, web technology is definitely superior and has come a long way over the years, if you did development before React/Angular and ES6+ you'd probably have found it less delightful.

          I imagine the visual GUI editor and cross platform support also helped with QML vs web when it came to building UIs for desktop/mobile apps. Earlier QML iirc had native UI (might have been QQC1), but that's gone now and can be one of the advantages Widgets has if you want the app to blend in (more of an issue on macOS/Windows I think vs Plasma where it's a tier 1 citizen), if you were considering web though, probably a non-issue then.

          Comment


          • #6
            Originally posted by bug77 View Post

            Are you sure you gave QML a fair chance? I haven't worked with it, but a friend of mine did/does and is pretty hyped up about it.
            Do they rave about anything in particular? What experience have they had elsewhere? Have they given something like React-Native a try? (desktop toolkits are a bit unofficial though)

            Comment


            • #7
              Originally posted by brent View Post
              You have to mix structure and style of your UI (by design!). HTML has a dedicated styling language (CSS), QML doesn't, and it's clearly missing. Y
              My experience isn't much and was back in 2017, so my memory could be foggy, but I recall you being able to separate your business logic from the UI layer. You'd handle UI interactions within QML, but any data and transformations could be done via backend code in C++ or Python.

              Originally posted by brent View Post
              Then there's components... there are two sets of component libraries (Quick Controls 1 and 2) and they are competing.
              QQC1 isn't really developed on anymore is it? Pretty sure it was being phased out for QQC2 which has numerous benefits (and a few drawbacks). I can relate to the lack of native component support (and small ecosystem to leverage anything else from others), would have hoped over the years they had expanded on that. You can probably find some from KDE, perhaps with Kirigami by now? (Meant to be a framework for QML, so as you would probably use such in web dev, this would likely make QML projects a nicer experience?)

              I definitely don't see them as competing.

              Originally posted by brent View Post
              However, where it gets really bad is interaction with C++ code. It's an unholy mess.
              I don't have much C++ dev experience, a bit with arduino hardware and that was not enjoyable. Python isn't much better. I know there are some unofficial bindings like Rust has which could be a nice option to work with, last I heard it wasn't a fantastic experience either though.

              Comment


              • #8
                Originally posted by brent View Post
                QML... "like HTML and CSS, just much worse". At least that's my conclusion after working with QML for a few months. I honestly wonder where Qt got its good reputation from. No wonder everyone is still using the classic Qt Widgets. If you think of starting a new project and trying QML... please don't.
                I think Qt got it's reputation from C/C++ programmers wanting a decent desktop UI toolkit, not necessarily web programmers looking at QML and comparing it to HTML.

                Comment


                • #9
                  In my opinion will be much more interesting to make backend for Svelte into QML.

                  Comment


                  • #10
                    Originally posted by brent View Post
                    QML... "like HTML and CSS, just much worse". At least that's my conclusion after working with QML for a few months. I honestly wonder where Qt got its good reputation from. No wonder everyone is still using the classic Qt Widgets. If you think of starting a new project and trying QML... please don't.
                    Meanwhile 90% of "modern" web development is with a javascript framework that spits out the html and css on the client except its not in a well designed markup itself, its just javascript functions, arcane overloads, and callback hell.

                    Comment

                    Working...
                    X