Unsolved Qt Quick vs Flutter
-
@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:
-
Flatter is not the solution itself. It's only framework on Dart.
-
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.
-
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".
-
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. :)
-
@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. -
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?
-
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 . -
This post is deleted!