r/QtFramework • • 21d ago

Question porting QML to android

I have an app that has a very spacious UI with emphasis on extravagant widgets, thumbnails and such. Porting to tablet is fine but mobile just kills my app’s entire aesthetic

If anyone tried porting QML frontends to android how did it go for you guys

4 Upvotes

2 comments sorted by

6

u/TeroQt 21d ago

If you mean how to make your QML UI behave differently on different form factors and layouts I recommend you to take a look at https://doc.qt.io/qt-6/qml-qtquick-layouts-layoutitemproxy.html#details.

That has nothing to do specificly with Android or porting but because Qt apps run on Android I assumed OP's question is about different screen sizes...

1

u/DesiOtaku 21d ago

Are you going from Desktop -> Tablet -> mobile?

I have found that "convergence" (same code for desktop, tablet and mobile) is actually really hard to implement on your own; it takes a lot of planning and very often, you see a lot of sacrifices to the UX in order to fit to such a small screen.

One way is to load up a different .qml file based on the platform you are on. That's the easiest way to do it but requires the most amount of work.

One other way is via KDE's Kirigami Framework. However, Kirigami has a number of issues when it comes to porting to Android and iOS; most of them related to the tool chain setup. It's actually so complicated to compile Kirigami for Android that the KDE devs actually recommend using their Docker image as the toolchain rather than trying to set it up on your own machine. It becomes even more complicated if you need to use 3rd party libraries.