Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Quick vs Flutter



  • @LeLev

    Felgo, unlike Qt open-source, gives you almost nothing freely. :(


  • Moderators

    @tomy said in Qt Quick vs Flutter:

    @LeLev

    Felgo, unlike Qt open-source, gives you almost nothing freely. :(

    They have to eat something ;-)

    Plus, then it comes to mobiles, Qt on iOS is not free anyway (and using LGPL on Android is tricky, too).


  • Qt Champions 2016

    for me the decision is clear: I'll use Qt for mobile
    have developed some very complex apps for customers out there running on thousands of devices
    always mobile biz apps, running in-house
    all my apps developed with QtQuickControls2 (QQC2) are very performant

    my subjective personal POV: comparing flutter UI code and QML Code --> QML Code is much easier to read.
    I never studied C or C++, developed 10+ years with Java
    then with BlackBerry 10 / Cascades first time had to deal with Qt-C++ and it is really easy to understand
    as BlackBerry faded away some years ago I started with Qt and QQC2 - UI in QML, biz logic, network, ... in C++

    Material style looks good on Android and iOS - my apps are running from lowcost-Android up to iPad 12.9 pro, in many cases together with Bluetooth devices (Scanner, Printer, eCards, waiter lock, ...)

    It toom a while to understand QtCreator coming from so many years using Eclipse IDE, but finally I must say QtCreator is great for x-platform mobile development

    upcoming Qt 6 with reduced QML 3 will provide an even more performant environment (QML automatically by magic compiled to C++) and better content assist while hacking code. I'll port all my apps to Qt 6 / QML3 and start a new blog series about, probably also working on a book Qt6-for-mobile later this year)

    so if starting new I would give Qt a try


  • Moderators

    Great info, @ekkescorner , as always! Thanks for chiming in.

    in many cases together with Bluetooth devices (Scanner, Printer, eCards, waiter lock, ...)

    Lucky you. My experience with BT support so far was really bad, but it wasn't fully Qt's fault. All OSes treat BT differently, have different bugs etc. Maintaining an app with BLE support on Windows, Android, iOS, macOS is a real nightmare.


  • Qt Champions 2016

    @sierdzio yep - not so easy with BT on different platforms. have done this for Android and iOS. then a customer asks to support W10 tablets. I'm not a windows developer and managed it to work on W10, too. on macOS I've seen that some devices are working and others not. (Using macOS only while developing not in production)
    I'm also doing BT Classic for Scanners and Printers on Android.
    Luckily Qt provides this, too. Just implementing all the pieces. will blog later on this.

    Take a look at Flutter: different plugins for BLE and BT Classic from different developers. I really prefer to get this directly from Qt.
    (yep - would be great to get more from Qt for mobile, but a big thanks for all the work on BT)



  • @ekkescorner

    QML Code is much easier to read.

    So it's the important point you think Qt (for mobile) has compared to Flutter. I agree with that it has a great impact on app maintenance. I hope Qt company will pay more attention to mobile apps so that it has more words to say in this "mobilized" world against the bigger company backing Flutter, Google! :|

    probably also working on a book Qt6-for-mobile later this year)
    so if starting new I would give Qt a try

    That sounds awesome. Looking forward to seeing things from you. :)

    If the person downloads the newest version of Qt, will he/she be able to use Qt 6 and QML 3 on it now, please?


  • Moderators

    @tomy said in Qt Quick vs Flutter:

    So it's the important point you think Qt (for mobile) has compared to Flutter. I agree with that it has a great impact on app maintenance. I hope Qt company will pay more attention to mobile apps so that it has more words to say in this "mobilized" world against the bigger company backing Flutter, Google! :|

    since Google/Alphabet stands behind flutter, chances are high that it will die/be unspported/ dropped in 1 - 2 years time, like 80% else made by google.

    I'm joking, googles history speaks for itself.

    If the person downloads the newest version of Qt, will he/she be able to use Qt 6 and QML 3 on it now, please?

    Not as far as I know, maybe you can get a preview/alpha version once 5.15 is officially out.


  • Qt Champions 2016

    @tomy the way from Qt 5 / QML2 to Qt 6 / QML3 will be a step-by-step process
    Qt 6.0 is planned for Nov 2020 - I expect End of 2020 or first quarter 2021 ;-)
    about Qt 6: https://www.qt.io/blog/2019/08/07/technical-vision-qt-6

    the process starts with Qt 5.15
    many new things will be backported to 5.15
    there will also be help from QtCreator to see what will be deprecated in Qt 6 / QML 3
    hopefully this will work smooth

    a first blog about new ways to go with QML in 5.15: https://www.qt.io/blog/qml-type-registration-in-qt-5.15

    I'll try to follow this process and blog about and report issues to help Qt
    have no idea how much work this will be and how easy / diffcult it will be to transform apps to Qt6 / QML3

    I have created some very complex apps and I know most of my own project rules won't work anymore

    some years ago I started with Qt as a newbie - this was the time where first Betas of QtQuickControls2 came out.
    I tried to use them, tested, blogged, requested features, added issues, ... - this was much work, but I got many of my issues/requests solved, so it was worth spending the time and motivates me to do the same with Qt6 QML3 for mobile apps



  • @tomy I had a good experience with Qt for my first Android project, but I wouldn't use it again, primarily because of the licencing issue and I don't like the direction Qt is heading (all new modules are GPL instead of LGPL). And lately it seems the Qt Company doesn't care about mobile platforms.

    When I started, there weren't many other cross-platform options. But now we have Flutter, React Native, and NativeScript, among others. I looked at Flutter and didn't like it. I don't like Dart and I don't like their UI markup. QML is the best UI markup language by far, IMO, and I will miss it.

    Another consideration for me back then was that I needed OpenGL. I don't know if Flutter et al support 3D yet, so if I need 3D again I'll probably use a game engine like Godot.

    But for my next 2D project I'm going to look at NativeScript. I guess now would be a good time to do that while I'm #SocialDistancing


  • Qt Champions 2016

    @Tom_H you know that there will be a new startup / small biz offering coming for $499/year ?



  • @ekkescorner I did not know that. Good to know. I just got done reading the article you posted about Qt 6. Interesting read.



  • I've been working with Flatter/Dart and this is explanation of my experience:

    1. Flatter is not the solution itself. It's only framework on Dart.

    2. The Dart VM - is SUPER slow. Here the benchmark https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/dart-java.html There are fundamental issue in threads. The manner of threads - the reason of why it's so slow. There are not about percents, there are about times.

    3. Extremely difficult in reality to add something native. You should be creating extensions to Dart VM on C++ In case of very restricted functionality for now - it's might be HUGE problem. (One question - if you need to add something on C++ to Dart, why Dart?) For now I would say - no any cross-platform 100% covering native. For me extremely important to be able to add native without troubles. Dart - is nothing about "without trouble".

    4. SUPER poor community, a lot of noobs that will be copy-pasting official doc. Sometimes to find solution beside standard reference almost impossible or will get HUGE amount of time.

    My own opinion: if you going to develop something very simple - Dart - might be solution, it's fast in developing and "idiot friendly" (BTW - if you look carefully on Dart itself, you might be seeing total paradigm compatibility to QML). The advantage of Flatter/Dart - very good implementation to Google services, it's in box from begin. If you going to develop something that require a little more then just getting JSON from server - definitely NO Dart at all. The promo of being "super fast UI" - is only if you using their precompiled UI components. In other case - super slow.

    All of it my own experience of developing cross-platform applications. I've started cross-platform before mobile development based on Chromium Embedded https://en.wikipedia.org/wiki/Chromium_Embedded_Framework in 2012. We've been developing application based on WebUI for Windows and Linux. After it iOS native developing since iPhone 4, and now only Qt and sometimes native.



  • Thanks all,

    So to sum up, still QtQuick is better for mobile apps and the real winner. :)


  • Qt Champions 2016

    @tomy the new 'Small Business License' will help to make the right decision: https://www.qt.io/blog/available-now-qt-for-small-businesses
    now up to 250K $ revenue - only 499$ p.a. -- embedded, mobile, desktop -- up to 4 devs



  • I use Qt for Android on Play Store. I usually use JavaScript to develop QML apps. I had to search for an alternative for these reasons;

    • The most important reason, app size is too much. Hello World QML app takes more than 40 MB on Android, APK size is 13 MB+. Qt copies all QML modules to APK's assets folder and it also copies some unused libraries to libs folder. This increases APK size.
    • Basic things like updating, editing, saving a dynamic list model in QML-JS are tedious for me.
    • Learning c++ with Qt takes time :)
    • There is not officially mobile advertising platform support (I use an open source project for Qt and Admob)
    • QML development is too slow. QML 1.0 made Nokia N9's (2011) component seems more advanced than QQC2 Material component
    • License for commercial is very expensive for me.

    I try to learn Flutter with an Udemy course. Flutter has more native looking interface compared to React Native and Native Script. Flutter has less app size compared to QML apps. It can also be developed for Web. Qt's Web Assembly is too slow compared to Flutter Web. Its license is more free than Qt so I can have commercial apps. I think Dart libraries will increase in the near future.
    Qt supports c++ and many Javascript libraries. This makes it easy to develop complex apps with Qt. I will continue to develop my complex projects with Qt. I have simple QML apps that are almost 90MB on Play Store. I think to convert them to Flutter in order to reduce app size. I think to use Flutter for simple apps for now.



  • @edip

    Hello World QML app takes more than 40 MB on Android

    There might be a problem, say, building the app using "Debug", with the case, otherwise it shouldn't be that much for such a trivial app.
    I have a good but basic game (2D) created using QtQuick with many features like, images, sounds, DB and other items working very good on all android devices. It's only 21MB. :)



  • @tomy I tested an empty project with release mode ARMv8, the APK was 10.8 MB, after installation it is 44.3 MB on device on Qt 13.0. I was wrong about 13MB :) Your game's APK is 21MB or it is the size after installation?


  • Moderators

    important question @edip

    did you sign the app with a legit key ? The debug information are not striped if its not signed, even in release mode



  • It was working before signing. After signing I get the error :D

    Error: A JNI error has occurred, please check your installation and try again
    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
    	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    	at java.net.URLClassLoader.access$100(URLClassLoader.java:74).
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
    	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
    apksigner command failed.
    

    When I don't use Qt for a few months I get this kind of weird errors :) But as you said after signing, APK size reduced to 9.9 MB.
    Edit: After uninstalling Android SDK Build Tools 30 rc2 version, it worked.



  • @edip For mobile ads I use QtAndroidTools. It works very well. I use it for banner ads and will soon try the rewarded video thing.



  • Thanks for suggestion @Tom_H I also use it and I use banner ads. It was working 2 months ago all the time. But It recently doesn't work on my phone. Also banner of my Qt apps didn't work for other people's device in my country. As far as I see from the impressions, it works other countries. Maybe it is because of there is no suitable ad to display. Test ads work properly.
    Edit: The ads are working now .


Log in to reply