QML or traditional gui?



  • Hello, everyone.

    I'm going to create some big application with Qt and I'm wondering about technology to use in it. Is it should be QML or traditional GUI which we all used before QML?
    I want discuss with you their advantages and disadvantages focusing on point that application is full of different functions and it's complicated.

    I really find qml like "WOW!" but it seems to me that:

    • it won't be ready for production usage for at least year
    • it's not intended to create anything but little apps just for fun
    • it's not have such performance as traditional Qt GUI, i.e. in complex UI with a lot of elements it will take a lot of time to react on user's actions

    Where am I right and where I'm wrong?



  • QML is something that you can use as a base of your UI and insert classic widgets where it will be needed (for example if you will want some controls like sliders or checkboxes or spinboxes). Of course, you can design these controls by yourself if you want them to look different from classic ones. Qml is just a tool and it can be used together with classic widgets.
    Performance is less or more ok. We develop mobile app and most if its UI is based on QML with a quite big number of elements and binded properties and it works ok at Nokia N8 and HTC Hero (at last one it has some speed issues, but it is more because of Android platform, not because of qml I think).
    Of course, QML has some problems with performance but most of them can be workarounded.

    If you really want us to help you with decision then I think it will be better if you can provide some more info about what you want to do and maybe with some mockups (if it is not NDA of course).



  • Denis, it will be internal science app with an interface like adobe lightroom.
    Won't it be painful to create such UI with qml? As I understand it intends to quick(it's even calls Qt Quick, huh;-) creation of apps.
    And important question - won't qtgui be totally replaced with qml in future releases? Or they gonna exist together?



  • Googled a bit for lightroom sreenshots (never used it). I think that a best approach for is using QML for most of UI and widgets where it is needed. But also you can try to write a mockup at QML and look will it work with needed performance or not.
    Not aware about replacing qtgui with qml, I'm not troll :)



  • "it won’t be ready for production usage for at least year"

    Don't know the timespan, but yes, it's not yet production quality.

    "it’s not intended to create anything but little apps just for fun"

    It will be an essential part at least for mobile applications.

    Right now, a lot of features are missing in QML, especially for desktop UIs. Unless you want a UI consisting of rectangles, go for a "classic" UI.



  • For desktop purposes Qt still advice to go for classic C++ UI programming. Can't remember where I read that though...



  • As for me, then my attitude is as follows: QML - mobile devices, classical gui - desktops.



  • It might just end up as "Qml everywhere" :)



  • [quote author="chetankjain" date="1288865708"]It might just end up as "Qml everywhere" :)[/quote]

    Yes, I also think so, but it will take some time for QML to get mature and stable.



  • I hope Nokia isn't like Microsoft, where now WinForms is almost totally replaced with WPF. I think WinForms has many advantages over WPF, eg. loading time. I imagine that the classic QtGui has many advantages over QML (at least at this point). I hope that both will continue to be available.


  • Moderators

    My impression (Disclaimer: I never used Qt Quick so far for my work!) is that it is great for non-standard UIs, independent of where those run. It should make sense to check out Qt Quick for any highly styled application.

    If you want "full platform integration" (widgets that behave like in other applications on the system) then I would at this time prefer the classic widgets.

    Adobe lightroom looks like it would need a lot of customization and styling... so why not take a day or two to prototype something in Qt Quick? Styling is way simpler there!

    About speed: Quick is meant to work great on mobile devices, so it should perform well on a desktop machine:-)



  • [quote author="Denis Kormalev" date="1288824473"]QML is something that you can use as a base of your UI and insert classic widgets where it will be needed (for example if you will want some controls like sliders or checkboxes or spinboxes).[/quote]

    Are you sure? I saw many examples for use QML components into a classic app via QDevlarativeView, but none for use qt classic widgets in a QML app.



  • [quote author="Cochise" date="1290101202"]
    Are you sure? I saw many examples for use QML components into a classic app via QDevlarativeView, but none for use qt classic widgets in a QML app.
    [/quote]

    You can put your QWidgets inside QGraphicsProxyWidgets, then register them as QML components.



  • Cochise, yes, I'm sure. We are using QML in this way. Main part of GUI is in QML and sometimes there are injections of classic widgets via graphics proxy widgets.

    UPD: anselmolsm, or simply insert them as children of root Object, it also works if you don't need a lot of work with them in qml.



  • [quote author="Denis Kormalev" date="1290105154"]
    UPD: anselmolsm, or simply insert them as children of root Object, it also works if you don't need a lot of work with them in qml.[/quote]

    Yep, it also works. I think we should create a wiki page about it with examples, it is not the first time I see this question here in the DevNet Forum. (I won't put the example here because it is not the main subject of this topic :-) )

    Cochise, parts of the KDE PIM Mobile use QWidgets in this way. It is not ideal, though.



  • Can anyone describe advantages or disadvantages of using QML for standart project, for example, like atandart office application?



  • There are some questions and answers to this topic. I added a section on the wiki page about QML:
    "Qt Quick":http://developer.qt.nokia.com/wiki/Qt_Quick


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.