Qt Development – Can Desktop Programs Be Recompiled for Android/iOS?

androiddesktop applicationiosmobileqt

One of the advantages of open-source programs is that they can be ported easily to any platform simply by recompiling. Qt is also a cross-platform toolkit that can work on several platforms simply by recompiling, and so applications can be ported between Windows, Mac, Linux, and other desktop OS's.

Is there any possibility of somehow recompiling a desktop app that uses Qt into an Android or iOS application, using the exact same desktop toolkit (i.e. menu bars, buttons, etc.). I realize that this is simply not how Android applications should work (different UI paradigms), but it can have some uses, particularly with Android tablets. Open-source applications can be ported easily in theory, and android also supports keyboard and mouse so there's that. Complex applications that require a desktop UI can be ported to tablets.

I haven't found any examples, so there must be a reason why it's not common considering it should be easy to do in theory. This question also applies to other portable toolkits but Qt is the first thing I can think of. Also, iOS probably doesn't give you flexibility in this regard so it might be a good idea to talk mostly about Android as an example.

Note, I am fully aware that mobile apps should not use the same UI as desktops and that they have a completely different UI paradigm. I'm just asking if it's still possible to run desktop applications on mobile OS's simply by recompiling (and maybe a few minor changes), much like how desktop apps can be ported to other desktop platforms in the same way, and if it isn't, why not.

Best Answer

A simple search gets you to Qt docs that tell you all about porting a Qt app to Android.

As with most things, it depends - if you use features not supported by Android, then you'll have to do some porting. Otherwise, its generally easy.

Also Qt Quick controls will take on the native UI style for Android 3+

Related Topic