Saturday 9 November 2013

Porting a Qt Desktop application to Android

I am getting Dream to work on Android. There a many things to do and most of them are hard. I'll post a few things about the experience here. Things to do are:
  • port the audio capture and playout
  • Make dream work in a single window rather than many overlapping windows
  • get menus working
  • other things I haven't thought of yet
The first thing I tried was to write an openSL ES sound driver. I couldn't get it to work. Qt is supposed to support capture and playback using Qt Multimedia on Android from Qt 5.2. So I've hacked Dream to use Qt Multimedia. If it works well on Andriod we can make it the default for a GUI build and just keep pulseaudio, portaudio and Windows MM for console builds. I tried making a main window display in QML. It works OK but it will be much quicker to stay mostly with QWidgets. I found the Qt 5.2beta1 needs the QML libraries anyway so I gave it a go. It seems you can embed QML in QWidgets but not the other way round. See QML in a QWidget.