Results 1 to 3 of 3

Thread: Android GUI development for existing c++ project

  1. #1
    Join Date
    Oct 2019
    Posts
    1
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Android GUI development for existing c++ project

    Hello everyone.
    I am new to Qt and could really use some help in this one.

    What I am trying to do:
    As the title says, I have a rather complex c++ project that runs on terminal which I want to port to mobile.
    This project,in order to execute, takes some user input,calculates the results and then prints them on screen.
    What I want to do is build some simple GUI for Android where the user can input those variables,pass them to the main project and then print the output.
    How can I achieve this in Qt? Can someone put me in the right track on this on what tools do I need for my environment and how to proceed?

    Thanks in advance.

  2. #2
    Join Date
    Aug 2015
    Posts
    20
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Android GUI development for existing c++ project

    look at: youtube android app qt creator.

  3. The following user says thank you to kbsk007 for this useful post:

    nandrius (18th October 2019)

  4. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,170
    Thanks
    235
    Thanked 662 Times in 652 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Android GUI development for existing c++ project

    You first need a cross-compiler for Android, which you can probably get from Google. This needs to be installed and integrated into your development tool. For Qt Creator, you add it as a kit.

    You should then verify that you can actually build your project as-is using the cross-compiler. Install and run the apk on Android to verify it works in terminal mode. You can use VirtualBox to install Android as a virtual machine and run it on your PC inside the VM. Obviously, things like touch probably won't work with the VM, but mouse and keyboard will.

    Next, you should implement a GUI in Qt in your PC's native OS (not Android), and get it working. This is far easier than trying to implement it on Android only.

    Next, you port it to Android OS. You will need to install a Qt distribution on your PC that is compatible with the cross-compiler you have installed. In Qt Creator, switch the target to use the Android kit and rebuild the project. You will then need to learn how to deploy and debug this executable either on a real Android device or in the VM.

    That's about as much advice as I can give you. It has been years since I have played around with developing an Android app with Qt and I would have to re-learn it all.

    Others on this forum might be able to give you advice on the details. You could also read the Qt documentation on Qt Creator, Android, and cross-platform development.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  5. The following user says thank you to d_stranz for this useful post:

    nandrius (18th October 2019)

Similar Threads

  1. Replies: 1
    Last Post: 3rd August 2016, 08:21
  2. porting existing QtWidget app from linux to android
    By badril in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 10th August 2015, 12:10
  3. Qt 5.2 or 5.3RC android app development and Google maps usage question
    By DonRico in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 16th May 2014, 10:41
  4. Help me on Android Development (Please Please Read)
    By Sparkle24 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 7th March 2013, 10:33
  5. Replies: 3
    Last Post: 17th July 2012, 21:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.