SlideShare a Scribd company logo
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 1 | 19
Tutorial
Install Qt/Qt Quick
Target : Android
June 2015
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 2 | 19
The enclosed material is provided under the Creative Commons Attribution-Share Alike 3.0 License Agreement.
The full license text is available here:
http://creativecommons.org/licenses/by-sa/3.0/legalcode.
Qt and Qt logos are registered trademarks of The Qt Company (http://www.qt.io/about-us/) in Finland and other
countries worldwide.
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 3 | 19
Definitions
Termine Definizione
JDK Java Development Kit
NDK Native Development Kit
QML Qt Meta Language o Qt Modeling Language
Qt Qt , or "cute", is the Cross platform Application Framework provided by The Qt Company
Qt Quick Qt User Interface Creation Kit
Purpose
This tutorial introduces Qt and Qt Quick application framework for Android target. Qt Italia web community uses it
during meetups or workshops as a step-by-step guide to show installation process.
What we need
1) OS: Ubuntu Linux 15.04 64 bits
2) Android SDK: http://dl.google.com/android/android-sdk_r24.2-linux.tgz
3) Android NDK: http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin
4) Java SE Development Kit (JDK) v6 o successivi oppure OpenJDK per Linux
5) Apache ant and 32 bits dependency libraries
6) Qt Application framework: http://www.qt.io/download-open-source/
Download the packages
We can start now by downloading all the packages we need. First of all we go to
http://developer.android.com/sdk/index.html
to download the package for Linux as reported in following picture:
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 4 | 19
Now we can download the Native Development Kit. We can go to:
http://developer.android.com/tools/sdk/ndk/index.html
to download the package for Linux as reported in following picture:
Now we need the Qt Application framework. We go to
http://www.qt.io/download-open-source/
to download the online installer.
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 5 | 19
Now we have all we need and we can start the installation process.
Installing
First of all we have to install openjdk and ant on our Linux Ubuntu distro. We can open a terminal window and type:
sudo apt-get install ant openjdk-7-jdk:
The system will ask for a password and then starts the installation:
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 6 | 19
We can accept (Y) and go on.
As mentioned before, we use a 64 bits Linux Distro. It is necessary to install the following dependencies library to use
some 32 bits executables like adb (Qt Creator uses adb to detect connected devices)
This is the command to install the dependencies:
sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Type Y and go on.
Now we can install another library with the following command:
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 7 | 19
sudo apt-get install libsdl1.2debian:i386
Type Y and go on.
Now we can go on Downloads directory. We are going to use following files:
From a terminal window we have to make executable the package android-ndk-r10e-linux-x86_64.bin, we can do this
with following command:
chmod a+x android-ndk-r10e-linux-x86_64.bin
Then we can run it, but before we have to choose where to put the extracted files. In our example we decided to put all
the extracted files in /opt.
First of all we have to move the files to /opt. Type:
sudo mv android-ndk-r10e-linux-x86_64.bin /opt
and
sudo mv android-sdk_r24.2-linux.tgz /opt
We can go to /opt folder and run this command:
./android-ndk-r10e-linux-x86_64.bin
At the end the new directory android-ndk-r10e will be created under /opt.
Now we have to exctract the second file. Type the command:
sudo tar –xzf android-sdk_r24.2-linux.tgz
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 8 | 19
The new directory /opt/android-sdk-linux will be created. Now under /opt we will find the following directory:
Now it’s time to update our SDK Android with this command:
sudo /opt/android-sdk-linux/tools/android update sdk
Remember to change the attributes in order to make it executable if necessary…
chmod a+x android
The following picture will show the main window of the program. We decided to remove Android TV and Android Wear
target for current API version (Android 5.1.1. - API 22).
Press Install … accept the license and wait for the download… it will take some time…
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 9 | 19
Now it’s time to install the Qt Application framework we downloaded before.
If the downloaded file qt-unified-linux-x64-2.0.1-online.run is not executable we have to change the attribute with the
following command:
chmod a+x qt-unified-linux-x64-2.0.1-online.run
and now we can run it:
./ qt-unified-linux-x64-2.0.1-online.run
Following pictures will show the dialogs used by the online installer.
Press Next
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 10 | 19
Type your account credentials or create a brand new account and press Next.
If you don’t need custom proxy settings press Next
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 11 | 19
Now choose the desired target folder and press Next. For this example we used the default location.
This is what we need so press Next. And then accept the license.
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 12 | 19
Press Next and then Install
It will take some time…
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 13 | 19
At the end we have
Now almost everything is ready. We have to do some custom settings to allow code generation from Qt Creator. To do
so, open the menu Tools >> Options
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 14 | 19
The following dialog will be shown:
As reported in picture, select Android tab and write the path for Android SDK and NDK. In our exampe they are located
in /opt directory.
Deploy e debug
In order to load and debug our applications it is important to select developer mode on the target smartphone. During the
first USB connection between the development computer and the device we have to confirm USB debug. On the
development desktop following message will be shown
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 15 | 19
Hello World
In order to test our installation we now use Qt Creator to write a first “Hello World” application.
Press New Project button on Qt Creator main window:
On the New Project wizard select Qt Quick Application as in following picture:
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 16 | 19
Name the project HelloWorld.
Press Next.
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 17 | 19
Press Next.
Press Next.
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 18 | 19
Press Finish. Qt Creator will prepare the application files as reported in following picture.
Now press button , this will start the compiler and then the deploy on target.
A new dialog window will appear to select the target device as reported in previous picture. Choose your device and press
OK.
If everything is fine we see this App on our Android device:
Qt-Italia.org
P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 19 | 19
Now we are ready to develop Android Applications for smartphones and tablets. Qt Italia web community is going to
prepare other tutorials concerning Qt and Qt Creator, google Play publishing, QML and more…
Stay tuned!

More Related Content

What's hot

Getting started with wxWidgets
Getting started with wxWidgets Getting started with wxWidgets
Getting started with wxWidgets
Iulian-Nicu Şerbănoiu
 
wxPython and wxFormBuilder
wxPython and wxFormBuilderwxPython and wxFormBuilder
wxPython and wxFormBuilder
Jenny Liang
 
The Ring programming language version 1.9 book - Part 22 of 210
The Ring programming language version 1.9 book - Part 22 of 210The Ring programming language version 1.9 book - Part 22 of 210
The Ring programming language version 1.9 book - Part 22 of 210
Mahmoud Samir Fayed
 
PHP QA Tools
PHP QA ToolsPHP QA Tools
PHP QA Tools
rjsmelo
 
Docker and Running multiple versions of PHP @ CareerZoo Dublin
Docker and Running multiple versions of PHP @ CareerZoo DublinDocker and Running multiple versions of PHP @ CareerZoo Dublin
Docker and Running multiple versions of PHP @ CareerZoo Dublin
rjsmelo
 
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
msohn
 
NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017
Maarten Balliauw
 
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
Umar Yusuf
 
Docker & PHP - Practical use case
Docker & PHP - Practical use caseDocker & PHP - Practical use case
Docker & PHP - Practical use case
rjsmelo
 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
Johan Thelin
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
ICS
 
GNU Make, Autotools, CMake 簡介
GNU Make, Autotools, CMake 簡介GNU Make, Autotools, CMake 簡介
GNU Make, Autotools, CMake 簡介
Wen Liao
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
Johan Thelin
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Johan Thelin
 
Guide: How to Build OpenCV 3.0.0
Guide: How to Build OpenCV 3.0.0Guide: How to Build OpenCV 3.0.0
Guide: How to Build OpenCV 3.0.0
André Moreira
 
Development and deployment with composer and kite
Development and deployment with composer and kiteDevelopment and deployment with composer and kite
Development and deployment with composer and kite
Christian Opitz
 
Pipenv - The Python Companion You Wish You Always Had
Pipenv - The Python Companion You Wish You Always HadPipenv - The Python Companion You Wish You Always Had
Pipenv - The Python Companion You Wish You Always Had
Avi Aminov
 
Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!
Alfonso Garcia-Caro
 
Big Fat FastPlone - Scale up, speed up
Big Fat FastPlone - Scale up, speed upBig Fat FastPlone - Scale up, speed up
Big Fat FastPlone - Scale up, speed up
Jens Klein
 
Swift server-side-let swift2016
Swift server-side-let swift2016Swift server-side-let swift2016
Swift server-side-let swift2016
Eric Ahn
 

What's hot (20)

Getting started with wxWidgets
Getting started with wxWidgets Getting started with wxWidgets
Getting started with wxWidgets
 
wxPython and wxFormBuilder
wxPython and wxFormBuilderwxPython and wxFormBuilder
wxPython and wxFormBuilder
 
The Ring programming language version 1.9 book - Part 22 of 210
The Ring programming language version 1.9 book - Part 22 of 210The Ring programming language version 1.9 book - Part 22 of 210
The Ring programming language version 1.9 book - Part 22 of 210
 
PHP QA Tools
PHP QA ToolsPHP QA Tools
PHP QA Tools
 
Docker and Running multiple versions of PHP @ CareerZoo Dublin
Docker and Running multiple versions of PHP @ CareerZoo DublinDocker and Running multiple versions of PHP @ CareerZoo Dublin
Docker and Running multiple versions of PHP @ CareerZoo Dublin
 
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
Git Tutorial EclipseCon France 2014 - Git Exercise 01 - installation and conf...
 
NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017NuGet beyond Hello World - DotNext Piter 2017
NuGet beyond Hello World - DotNext Piter 2017
 
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
 
Docker & PHP - Practical use case
Docker & PHP - Practical use caseDocker & PHP - Practical use case
Docker & PHP - Practical use case
 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
GNU Make, Autotools, CMake 簡介
GNU Make, Autotools, CMake 簡介GNU Make, Autotools, CMake 簡介
GNU Make, Autotools, CMake 簡介
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011
 
Guide: How to Build OpenCV 3.0.0
Guide: How to Build OpenCV 3.0.0Guide: How to Build OpenCV 3.0.0
Guide: How to Build OpenCV 3.0.0
 
Development and deployment with composer and kite
Development and deployment with composer and kiteDevelopment and deployment with composer and kite
Development and deployment with composer and kite
 
Pipenv - The Python Companion You Wish You Always Had
Pipenv - The Python Companion You Wish You Always HadPipenv - The Python Companion You Wish You Always Had
Pipenv - The Python Companion You Wish You Always Had
 
Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!Madrid .NET Meetup: Microsoft open sources .NET!
Madrid .NET Meetup: Microsoft open sources .NET!
 
Big Fat FastPlone - Scale up, speed up
Big Fat FastPlone - Scale up, speed upBig Fat FastPlone - Scale up, speed up
Big Fat FastPlone - Scale up, speed up
 
Swift server-side-let swift2016
Swift server-side-let swift2016Swift server-side-let swift2016
Swift server-side-let swift2016
 

Similar to Install Qt/Qt Quick for Android devices

How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
Tech Bikram
 
How to develop a Flutter app.pdf
How to develop a Flutter app.pdfHow to develop a Flutter app.pdf
How to develop a Flutter app.pdf
Smith Daniel
 
pcDuino Presentation at SparkFun
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFun
Jingfeng Liu
 
Smiley033
Smiley033Smiley033
Android Training Ahmedabad , Android Project Training Ahmedabad, Android Live...
Android Training Ahmedabad , Android Project Training Ahmedabad, Android Live...Android Training Ahmedabad , Android Project Training Ahmedabad, Android Live...
Android Training Ahmedabad , Android Project Training Ahmedabad, Android Live...
NicheTech Com. Solutions Pvt. Ltd.
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
Codemotion
 
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
Umar Yusuf
 
NDK Introduction
NDK IntroductionNDK Introduction
NDK Introduction
RAHUL TRIPATHI
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
Alexandre Gouaillard
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto Project
Leon Anavi
 
verilog basics.ppt
verilog basics.pptverilog basics.ppt
verilog basics.ppt
8885684828
 
Z turn Board Tutorial Book
Z turn Board Tutorial BookZ turn Board Tutorial Book
Z turn Board Tutorial Book
Linda Zhang
 
snortinstallguide
snortinstallguidesnortinstallguide
snortinstallguide
Liễu Hồng
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020
Bogusz Jelinski
 
Introduction to pcDuino
Introduction to pcDuinoIntroduction to pcDuino
Introduction to pcDuino
Jingfeng Liu
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
Celine George
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
Cliff Samuels Jr.
 
Targeting Android with Qt
Targeting Android with QtTargeting Android with Qt
Targeting Android with Qt
Espen Riskedal
 
Webinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with DockerWebinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with Docker
Burkhard Stubert
 
Build and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with dockerBuild and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with docker
Qt
 

Similar to Install Qt/Qt Quick for Android devices (20)

How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
How to develop a Flutter app.pdf
How to develop a Flutter app.pdfHow to develop a Flutter app.pdf
How to develop a Flutter app.pdf
 
pcDuino Presentation at SparkFun
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFun
 
Smiley033
Smiley033Smiley033
Smiley033
 
Android Training Ahmedabad , Android Project Training Ahmedabad, Android Live...
Android Training Ahmedabad , Android Project Training Ahmedabad, Android Live...Android Training Ahmedabad , Android Project Training Ahmedabad, Android Live...
Android Training Ahmedabad , Android Project Training Ahmedabad, Android Live...
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!DESKTOP GUI APP DEVELOPMENT USING PYTHON!
DESKTOP GUI APP DEVELOPMENT USING PYTHON!
 
NDK Introduction
NDK IntroductionNDK Introduction
NDK Introduction
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto Project
 
verilog basics.ppt
verilog basics.pptverilog basics.ppt
verilog basics.ppt
 
Z turn Board Tutorial Book
Z turn Board Tutorial BookZ turn Board Tutorial Book
Z turn Board Tutorial Book
 
snortinstallguide
snortinstallguidesnortinstallguide
snortinstallguide
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020
 
Introduction to pcDuino
Introduction to pcDuinoIntroduction to pcDuino
Introduction to pcDuino
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
Targeting Android with Qt
Targeting Android with QtTargeting Android with Qt
Targeting Android with Qt
 
Webinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with DockerWebinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with Docker
 
Build and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with dockerBuild and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with docker
 

More from Paolo Sereno

Sviluppo di App con Qt Quick: un esempio di model-view-delegate
Sviluppo di App con Qt Quick: un esempio di model-view-delegateSviluppo di App con Qt Quick: un esempio di model-view-delegate
Sviluppo di App con Qt Quick: un esempio di model-view-delegate
Paolo Sereno
 
Integrazione QML / C++
Integrazione QML / C++Integrazione QML / C++
Integrazione QML / C++
Paolo Sereno
 
Installazione Qt/Qt Quick per target Android
Installazione Qt/Qt Quick  per target AndroidInstallazione Qt/Qt Quick  per target Android
Installazione Qt/Qt Quick per target Android
Paolo Sereno
 
Qt 4.5.3 con Visual C++ Express 2008 (edizione gratuita!)
Qt 4.5.3 con Visual C++ Express 2008 (edizione gratuita!)Qt 4.5.3 con Visual C++ Express 2008 (edizione gratuita!)
Qt 4.5.3 con Visual C++ Express 2008 (edizione gratuita!)
Paolo Sereno
 
Installazione Eclipse Cdt Per Qt
Installazione Eclipse Cdt Per QtInstallazione Eclipse Cdt Per Qt
Installazione Eclipse Cdt Per Qt
Paolo Sereno
 
Installazione Qt 4.5.3 per Ms Windows
Installazione Qt 4.5.3 per Ms WindowsInstallazione Qt 4.5.3 per Ms Windows
Installazione Qt 4.5.3 per Ms Windows
Paolo Sereno
 
Qt Lezione6
Qt Lezione6Qt Lezione6
Qt Lezione6
Paolo Sereno
 
Qt Lezione0: uso del C++ per scrivere applicazioni Qt
Qt Lezione0: uso del C++ per scrivere applicazioni QtQt Lezione0: uso del C++ per scrivere applicazioni Qt
Qt Lezione0: uso del C++ per scrivere applicazioni Qt
Paolo Sereno
 
Qt Lezione4 Parte2: creare un custom widget plugin per Qt Designer
Qt Lezione4 Parte2: creare un custom widget plugin per Qt DesignerQt Lezione4 Parte2: creare un custom widget plugin per Qt Designer
Qt Lezione4 Parte2: creare un custom widget plugin per Qt Designer
Paolo Sereno
 
Qt Lezione5: Layout management e Qt Designer
Qt Lezione5: Layout management e Qt DesignerQt Lezione5: Layout management e Qt Designer
Qt Lezione5: Layout management e Qt Designer
Paolo Sereno
 
Qt Lezione4 Parte1: creare un custom widget plugin
Qt Lezione4 Parte1: creare un custom widget pluginQt Lezione4 Parte1: creare un custom widget plugin
Qt Lezione4 Parte1: creare un custom widget plugin
Paolo Sereno
 
Qt Lezione3: un visualizzatore di immagini
Qt Lezione3: un visualizzatore di immaginiQt Lezione3: un visualizzatore di immagini
Qt Lezione3: un visualizzatore di immagini
Paolo Sereno
 
Qt Lezione2: Creare un’applicazione con Qt Creator in pochi semplici passi
Qt Lezione2: Creare un’applicazione con Qt Creator in pochi semplici passiQt Lezione2: Creare un’applicazione con Qt Creator in pochi semplici passi
Qt Lezione2: Creare un’applicazione con Qt Creator in pochi semplici passi
Paolo Sereno
 
Che cosa è il Qt Framework
Che cosa è il Qt FrameworkChe cosa è il Qt Framework
Che cosa è il Qt Framework
Paolo Sereno
 
Qt Lezione1: Creare una dialog Window con Qt Creator in 10 semplici passi
Qt Lezione1: Creare una dialog Window con Qt Creator  in 10 semplici passiQt Lezione1: Creare una dialog Window con Qt Creator  in 10 semplici passi
Qt Lezione1: Creare una dialog Window con Qt Creator in 10 semplici passi
Paolo Sereno
 

More from Paolo Sereno (15)

Sviluppo di App con Qt Quick: un esempio di model-view-delegate
Sviluppo di App con Qt Quick: un esempio di model-view-delegateSviluppo di App con Qt Quick: un esempio di model-view-delegate
Sviluppo di App con Qt Quick: un esempio di model-view-delegate
 
Integrazione QML / C++
Integrazione QML / C++Integrazione QML / C++
Integrazione QML / C++
 
Installazione Qt/Qt Quick per target Android
Installazione Qt/Qt Quick  per target AndroidInstallazione Qt/Qt Quick  per target Android
Installazione Qt/Qt Quick per target Android
 
Qt 4.5.3 con Visual C++ Express 2008 (edizione gratuita!)
Qt 4.5.3 con Visual C++ Express 2008 (edizione gratuita!)Qt 4.5.3 con Visual C++ Express 2008 (edizione gratuita!)
Qt 4.5.3 con Visual C++ Express 2008 (edizione gratuita!)
 
Installazione Eclipse Cdt Per Qt
Installazione Eclipse Cdt Per QtInstallazione Eclipse Cdt Per Qt
Installazione Eclipse Cdt Per Qt
 
Installazione Qt 4.5.3 per Ms Windows
Installazione Qt 4.5.3 per Ms WindowsInstallazione Qt 4.5.3 per Ms Windows
Installazione Qt 4.5.3 per Ms Windows
 
Qt Lezione6
Qt Lezione6Qt Lezione6
Qt Lezione6
 
Qt Lezione0: uso del C++ per scrivere applicazioni Qt
Qt Lezione0: uso del C++ per scrivere applicazioni QtQt Lezione0: uso del C++ per scrivere applicazioni Qt
Qt Lezione0: uso del C++ per scrivere applicazioni Qt
 
Qt Lezione4 Parte2: creare un custom widget plugin per Qt Designer
Qt Lezione4 Parte2: creare un custom widget plugin per Qt DesignerQt Lezione4 Parte2: creare un custom widget plugin per Qt Designer
Qt Lezione4 Parte2: creare un custom widget plugin per Qt Designer
 
Qt Lezione5: Layout management e Qt Designer
Qt Lezione5: Layout management e Qt DesignerQt Lezione5: Layout management e Qt Designer
Qt Lezione5: Layout management e Qt Designer
 
Qt Lezione4 Parte1: creare un custom widget plugin
Qt Lezione4 Parte1: creare un custom widget pluginQt Lezione4 Parte1: creare un custom widget plugin
Qt Lezione4 Parte1: creare un custom widget plugin
 
Qt Lezione3: un visualizzatore di immagini
Qt Lezione3: un visualizzatore di immaginiQt Lezione3: un visualizzatore di immagini
Qt Lezione3: un visualizzatore di immagini
 
Qt Lezione2: Creare un’applicazione con Qt Creator in pochi semplici passi
Qt Lezione2: Creare un’applicazione con Qt Creator in pochi semplici passiQt Lezione2: Creare un’applicazione con Qt Creator in pochi semplici passi
Qt Lezione2: Creare un’applicazione con Qt Creator in pochi semplici passi
 
Che cosa è il Qt Framework
Che cosa è il Qt FrameworkChe cosa è il Qt Framework
Che cosa è il Qt Framework
 
Qt Lezione1: Creare una dialog Window con Qt Creator in 10 semplici passi
Qt Lezione1: Creare una dialog Window con Qt Creator  in 10 semplici passiQt Lezione1: Creare una dialog Window con Qt Creator  in 10 semplici passi
Qt Lezione1: Creare una dialog Window con Qt Creator in 10 semplici passi
 

Recently uploaded

GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 

Recently uploaded (20)

GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 

Install Qt/Qt Quick for Android devices

  • 1. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 1 | 19 Tutorial Install Qt/Qt Quick Target : Android June 2015
  • 2. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 2 | 19 The enclosed material is provided under the Creative Commons Attribution-Share Alike 3.0 License Agreement. The full license text is available here: http://creativecommons.org/licenses/by-sa/3.0/legalcode. Qt and Qt logos are registered trademarks of The Qt Company (http://www.qt.io/about-us/) in Finland and other countries worldwide.
  • 3. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 3 | 19 Definitions Termine Definizione JDK Java Development Kit NDK Native Development Kit QML Qt Meta Language o Qt Modeling Language Qt Qt , or "cute", is the Cross platform Application Framework provided by The Qt Company Qt Quick Qt User Interface Creation Kit Purpose This tutorial introduces Qt and Qt Quick application framework for Android target. Qt Italia web community uses it during meetups or workshops as a step-by-step guide to show installation process. What we need 1) OS: Ubuntu Linux 15.04 64 bits 2) Android SDK: http://dl.google.com/android/android-sdk_r24.2-linux.tgz 3) Android NDK: http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin 4) Java SE Development Kit (JDK) v6 o successivi oppure OpenJDK per Linux 5) Apache ant and 32 bits dependency libraries 6) Qt Application framework: http://www.qt.io/download-open-source/ Download the packages We can start now by downloading all the packages we need. First of all we go to http://developer.android.com/sdk/index.html to download the package for Linux as reported in following picture:
  • 4. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 4 | 19 Now we can download the Native Development Kit. We can go to: http://developer.android.com/tools/sdk/ndk/index.html to download the package for Linux as reported in following picture: Now we need the Qt Application framework. We go to http://www.qt.io/download-open-source/ to download the online installer.
  • 5. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 5 | 19 Now we have all we need and we can start the installation process. Installing First of all we have to install openjdk and ant on our Linux Ubuntu distro. We can open a terminal window and type: sudo apt-get install ant openjdk-7-jdk: The system will ask for a password and then starts the installation:
  • 6. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 6 | 19 We can accept (Y) and go on. As mentioned before, we use a 64 bits Linux Distro. It is necessary to install the following dependencies library to use some 32 bits executables like adb (Qt Creator uses adb to detect connected devices) This is the command to install the dependencies: sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 Type Y and go on. Now we can install another library with the following command:
  • 7. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 7 | 19 sudo apt-get install libsdl1.2debian:i386 Type Y and go on. Now we can go on Downloads directory. We are going to use following files: From a terminal window we have to make executable the package android-ndk-r10e-linux-x86_64.bin, we can do this with following command: chmod a+x android-ndk-r10e-linux-x86_64.bin Then we can run it, but before we have to choose where to put the extracted files. In our example we decided to put all the extracted files in /opt. First of all we have to move the files to /opt. Type: sudo mv android-ndk-r10e-linux-x86_64.bin /opt and sudo mv android-sdk_r24.2-linux.tgz /opt We can go to /opt folder and run this command: ./android-ndk-r10e-linux-x86_64.bin At the end the new directory android-ndk-r10e will be created under /opt. Now we have to exctract the second file. Type the command: sudo tar –xzf android-sdk_r24.2-linux.tgz
  • 8. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 8 | 19 The new directory /opt/android-sdk-linux will be created. Now under /opt we will find the following directory: Now it’s time to update our SDK Android with this command: sudo /opt/android-sdk-linux/tools/android update sdk Remember to change the attributes in order to make it executable if necessary… chmod a+x android The following picture will show the main window of the program. We decided to remove Android TV and Android Wear target for current API version (Android 5.1.1. - API 22). Press Install … accept the license and wait for the download… it will take some time…
  • 9. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 9 | 19 Now it’s time to install the Qt Application framework we downloaded before. If the downloaded file qt-unified-linux-x64-2.0.1-online.run is not executable we have to change the attribute with the following command: chmod a+x qt-unified-linux-x64-2.0.1-online.run and now we can run it: ./ qt-unified-linux-x64-2.0.1-online.run Following pictures will show the dialogs used by the online installer. Press Next
  • 10. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 10 | 19 Type your account credentials or create a brand new account and press Next. If you don’t need custom proxy settings press Next
  • 11. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 11 | 19 Now choose the desired target folder and press Next. For this example we used the default location. This is what we need so press Next. And then accept the license.
  • 12. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 12 | 19 Press Next and then Install It will take some time…
  • 13. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 13 | 19 At the end we have Now almost everything is ready. We have to do some custom settings to allow code generation from Qt Creator. To do so, open the menu Tools >> Options
  • 14. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 14 | 19 The following dialog will be shown: As reported in picture, select Android tab and write the path for Android SDK and NDK. In our exampe they are located in /opt directory. Deploy e debug In order to load and debug our applications it is important to select developer mode on the target smartphone. During the first USB connection between the development computer and the device we have to confirm USB debug. On the development desktop following message will be shown
  • 15. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 15 | 19 Hello World In order to test our installation we now use Qt Creator to write a first “Hello World” application. Press New Project button on Qt Creator main window: On the New Project wizard select Qt Quick Application as in following picture:
  • 16. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 16 | 19 Name the project HelloWorld. Press Next.
  • 17. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 17 | 19 Press Next. Press Next.
  • 18. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 18 | 19 Press Finish. Qt Creator will prepare the application files as reported in following picture. Now press button , this will start the compiler and then the deploy on target. A new dialog window will appear to select the target device as reported in previous picture. Choose your device and press OK. If everything is fine we see this App on our Android device:
  • 19. Qt-Italia.org P . S e r e n o ( h t t p : / / w w w . q t - i t a l i a . o r g ) P a g . 19 | 19 Now we are ready to develop Android Applications for smartphones and tablets. Qt Italia web community is going to prepare other tutorials concerning Qt and Qt Creator, google Play publishing, QML and more… Stay tuned!