Archives For Install Qt

Install Qt 5.7

June 5, 2016 — Leave a comment

UPDATE: 2016-06-16: Qt 5.7 Release is out ! You can still follow my descriptions below from 5.7 RC – process is similar.

This blog series is about the new Qt Quick Controls 2 to develop mobile apps for Android and iOS.

Before going on you should have read my blog – esp. on ‘Prepare for Android / iOS‘ and ‘Prepare Devices

Besides Qt 5.7 you’ll also get a new Qt Creator 4.0.2.

Perhaps you already have an older version of Qt already installed, you can use the Maintenance Tool to update. I’m always doing a fresh install for each Beta, RC or Release.

Before downloading and installing you should know if you want to install the Open Source or Commercial version of Qt for Application Development.

Please take a look at Qt FAQ‘s and also my blog post about licensing and the new license for small Startups and Independent Developers.

I’m using the Commercial version for Startups – see Qt’s offer here: https://www.qt.io/start-up-plan/

Read more about Open Source vs Commercial also in my blog about ‘Install Qt 5.6


Here are my steps to download and install Qt 5.7 RC (commercial):

Install Qt 5.7

Go to your Qt Account – Downloads and select the Qt Online Installer:

01_download_01

 

UPDATE: now: 2.0.3-2 for Qt 5.7 release:

01_download_03

UPDATE: now: qt-unified-mac-x64-2.0.3-2-online.dmg

01_download_04

 

Here’s my download on OSX:

01_download_05

 

Double click to install:

02_install_01

 

Log into your Account:

01_download_04

Select the folder where to install:

02_install_03

 

As next select your components:

02_install_04

 

and wait for the installer:

02_install_05

 

If Installer finished, I’m not launching Qt Creator yet.

02_install_06

 

Start Qt Creator with -settingsPath

All Qt Creator instances by default share the settings. Having the new Qt Creator 4.0.2 and old 3.6.2 using the same settings is no good idea. Also I want to use different working directories for my Qt 5.6, 5.7 Beta, 5.7 RC and the new Qt 5.7 Release.

You can start Qt Creator wit parameter -settingsPath – here’s HowTo do this from OSX:

Search for the Qt Creator.app from Qt 5.7 and do a right-click on the app. Here’s the content:

02_qtc_settings_01

rename Qt Creator to something like Qt Creator-bin:

02_qtc_settings_02

From a Text Editor create a Script to execute the Qt Creator-bin with a parameter:

03_qtc_prepare

 

Save this file named “Qt Creator” besides the Qt Creator-bin:_

02_qtc_settings_04

Now you can start Qt Creator, which will execute the script:

02_qtc_settings_05

Qt Creator will create the QtProject folder where all the configuration settings are stored.

Now you can start multiple Qt Creator versions without any collision.

Qt Creator 4.0.2

First thing you’ll notice after starting Qt Creator 4.0.2 is the new default flat design. If you don’t like it you can go back to the old one or a dark theme:

04_qtc_prefs_01

 

I’m also changing the language from german to english.

And here’s the new flat design:

03_qtc_flat_03

Qt Creator Preferences Working Directory

Set your working directory for 5.7, if you are using different directories as I’m doing:

04_qtc_prefs_02

 

Qt Creator Preferences Android

Take a look at your Android preferences:

05_qtc_android_01

Select your SDK and NDK locations and check ‘Gradle’:

05_qtc_android_02

Qt Creator External Tools

I’m developing business apps and business apps always need support of languages (i18n). Configuring the External Tools for Linguist (Qt’s Tool to translate text from your QML and C++ sources) will make it more comfortable.

As first step we’ll add the Linguist App.You’ll find the Linguist at 5.7 –> clang_64 –> bin:

06_qtc_ext_tools_01

I like to use Tools in english, but the language cannot be changed yet for Linguist, so the trick is to rename the translations file, which in my case is 5.7 –> clang_64 –> translations –> linguist_de.qm:

06_qtc_ext_tools_02

Under Preferences –> Environment –> External Tools there already exist access to commands for lupdate and lrelease. (lupdate is looking for the strings you marked as translatable and to create or update the translation files <app>.ts. Using Linguist or external tools you can then translate the strings. lrelease compiles these translations from *.ts into *.qm. Only *.qml files will be deployed to your device)

I found out that the default configuration doesn’t work on Android and iOS – please change the executable:

06_qtc_ext_tools_04

06_qtc_ext_tools_05

Test if Linguist will start. From External Tools

06_qtc_ext_tools_06

Linguist should start:

06_qtc_ext_tools_07

Verify Installation: Gallery Qt Quick Controls 2

As last step verify if all is correct configured.

Best way to do this and to get a first impression of new QtQuick Controls 2 is to run the new Quick Controls 2 Gallery App.

From Overview – Examples search for “Gallery” and select the right one:

05_qtc_test_01

Configure your project for Android / iOS:

05_qtc_test_03

Now run on your device(s).

05_qtc_test_04

Select your Device – here’s my BlackBerry PRIV (Android 6.0.1):

05_qtc_test_05

… and the Gallery App is running:

05_qtc_test_06

Now you can try out all the new Controls.

Congrats – now you have installed Qt 5.7.  Some more appetizers ?

Clone my Examples from Github and Run

  1. First app with One Page
  2. StackView
  3. SwipeView
  4. TabBar
  5. Bottom Navigation
  6. Drawer Navigation

Please follow my blog series: https://appbus.wordpress.com/category/qt-for-mobile/overview/


← Back (Qt Community (Wiki, Forum, Lists))

→ Next Article (Qt Creator Intro)

⇐ Home (Overview / Topics)

This blog series is about the new Qt Quick Controls 2 to develop mobile apps for Android and iOS.

Qt Quick Controls 2 are introduced as a Technical Preview in Qt 5.6 and willbecome Qt Quick Controls 2 in Qt 5.7.

Qt 5.7 Beta was announced 2016-04-21. This Beta is only available as a download – not from Online Installers.

If you only want to do first steps to try out you can go on with the Qt 5.6 – if you want to get the newest features it makes sense to install Qt 5.7 Beta.

Attention: the new UI Controls are still named ‘qt.labs.controls’ – beginning with the Qt 5.7 RC the renaming into Qt Quick Controls 2 will befinished, so be warned: you must change the imports in your QML files as soon as Qt 5.7 RC is out.

Besides Qt 5.7 Beta you’ll also get a new Qt Creator 4.0 RC.

Here are the steps to download and install Qt 5.7 Beta:

Install Qt 5.7 Beta

Go to your Qt Account – Downloads and select Qt – 5.7.0-beta:

01_download_01

Here’s my download on OSX:

01_download_02

Double click to install:

01_download_03

Log into your Account:

01_download_04

Select the folder where to install:

01_download_05

As next select your components:

01_download_06

and wait for the installer:

01_download_07

01_download_08

Start Qt Creator with -settingsPath

All Qt Creator instances by default share the settings. Having the new Qt Creator 4 and old 3.6.2 using the same settings is no good idea. Also I want to use different working directories for my Qt 5.6 and the new Qt 5.7 Beta.

You can start Qt Creator wit parameter -settingsPath – here’s HowTo do this from OSX:

Search for the Qt Creator.app from Qt 5.7 Beta and do a right-click on the app. Here’s the content:

02_qtc_settings_01

rename Qt Creator to something like Qt Creator-bin:

02_qtc_settings_02

From a Text Editor create a Script to execute the Qt Creator-bin with a parameter:

02_qtc_settings_03

Save this file named “Qt Creator” besides the Qt Creator-bin:_

02_qtc_settings_04

Now you can start Qt Creator, which will execute the script:

02_qtc_settings_05

Qt Creator will create the QtProject folder where all the configuration settings are stored.

Now you can start Qt Creator 3.6.1 from Qt 5.6.0 together with Qt Creator 4.0 RC from Qt 5.7 Beta without any collision.

Qt Creator 4.0 RC

First thing you’ll notice after starting Qt Creator 4.0 is the new default flat design. If you don’t like it you can go back to the old one or a dark theme:

03_qtc_flat_01

And here’s the new flat design:

03_qtc_flat_03

Qt Creator Preferences Working Directory

Set your working directory for 5.7 Beta:

04_qtc_workdir_01

Qt Creator Preferences Android

Take a look at your Android preferences:

05_qtc_android_01

Select your SDK and NDK locations and check ‘Gradle’:

05_qtc_android_02

Qt Creator External Tools

I’m developing business apps and business apps always need support of languages (i18n). Configuring the External Tools for Linguist (Qt’s Tool to translate text from your QML and C++ sources) will make it more comfortable.

As first step we’ll add the Linguist App.You’ll find the Linguist at 5.7 –> clang_64 –> bin:

06_qtc_ext_tools_01

I like to use Tools in english, but the language cannot be changed yet for Linguist, so the trick is to rename the translations file, which in my case is 5.7 –> clang_64 –> translations –> linguist_de.qm:

06_qtc_ext_tools_02

Under Preferences –> Environment –> External Tools there already exist access to commands for lupdate and lrelease. (lupdate is looking for the strings you marked as translatable and to create or update the translation files <app>.ts. Using Linguist or external tools you can then translate the strings. lrelease compiles these translations from *.ts into *.qm. Only *.qml files will be deployed to your device)

I found out that the default configuration doesn’t work on Android and iOS – please change the executable:

06_qtc_ext_tools_04

06_qtc_ext_tools_05

Test if Linguist will start. From External Tools

06_qtc_ext_tools_06

Linguist should start:

06_qtc_ext_tools_07

Verify Installation: New qt.labs.controls Project

As last step verify if all is correct configured. Normaly I do this using the qt.labs.controls Gallery app, but because of work on the renaming from qt.labs.controls into Qt Quick Controls 2 it’s missed as part of  Qt 5.7 Beta. So let’s try out a brand new qt.labs.controls Project wizard:

07_verify_installation_01

07_verify_installation_02

Select your Kits – I selected Android and iOS devices:

07_verify_installation_03

You’re done. Connect your device via USB and hit ‘Run’:

07_verify_installation_05

The app should run on your devices.


Congrats – now you have installed Qt 5.7 Beta. Please follow my blog series: https://appbus.wordpress.com/category/qt-for-mobile/overview/

As soon as Qt 5.7 RC is out I’ll edit the articles containing 5.6 screenshots.

Patch Qt 5.6.0

April 8, 2016 — Leave a comment

While testing Qt 5.6.0 and qt.labs.controls on Android and iOS I noticed a problem.

Please take a look at this screenshot:

01_textfield

qt.labs.controls provide three styles: Material, Universal, Default. Controls are different but should have similar size.

As you can see the text in Material style is too small. So I reported a bug: https://bugreports.qt.io/browse/QTBUG-50971

Bug was fixed soon by J-P Nurmi 🙂

02_bugfixed

As I reported the bug, branch 5.6.0 was already freezed, so the fix is in current 5.6 branch: 5.6.1

If you installed 5.6 you probably got 5.6.0.

You can verify your version from Qt Creator –> Preferences –> Build & Run –> Qt Versions

03_my_version

If you want to do some real apps from Qt 5.6.0 you should patch your installed Qt Version.

Qt is Open Source – so it’s no problem to get the changed module 🙂

From the bug you can get the info of the affected component (qt/qtquickcontrols2) and the branch (5.6) where it was fixed:

04_component_branch

Now it’s easy to patch.

Hint: you must do this for all installed kits – so I have done it for Android and iOS.

Open a Terminal and do this to patch the Android Kit:

export ANDROID_NDK_ROOT=/your_path_to/android-ndk-r10e
cd /your-path-to-store-cloned-repo_android
git clone --branch 5.6 git://code.qt.io/qt/qtquickcontrols2.git
cd qtquickcontrols2
/your-path-where-qt-is-installed/5.6/android_armv7/bin/qmake
make
make install

and similar for iOS:

cd /your-path-to-store-cloned-repo_ios
git clone --branch 5.6 git://code.qt.io/qt/qtquickcontrols2.git
cd qtquickcontrols2
/your-path-where-qt-is-installed/5.6/ios/bin/qmake
make
make install

thanks @jpnurmi helping me to make this work.


← Back (Install Qt 5.6)

→ Next Article (Qt Creator – Intro)

⇐ Home (Overview / Topics)


Install Qt 5.6

April 4, 2016 — 2 Comments

Update 2016-06-04: Qt 5.7 RC is out – here’s the blog HowTo Install.

Update: 2016-04-21 Qt 5.7 Beta is out. I have written a blog post HowTo install the Beta: https://appbus.wordpress.com/2016/04/22/install-qt-5-7-beta/


Hint: some screenshots are from Qt 5.6 RC – the final 5.6 release install process looks similar.

This blog post only covers ‘Qt for Application Development‘ focussed on mobile APP Development.

Qt can also be used for ‘Device Creation‘.

Qt is Open Source and also provides commercial licenses. Before downloading / installing Qt you should think about the right license for your apps. Please take a look at Qt FAQ‘s and also my blog post about licensing and the new license for small Startups and Independent Developers.

Qt 5.6 will be installed using an online installer.

Qt 5.6 Open Source Online Installer

You’ll get the Installer from http://www.qt.io/download-open-source/

install_01

Select the Installer for your OS and download the small Online Installer.

The installation workflow will be similar to commercial license described in more detail:

Qt 5.6 Commercial Online Installer

If you don’t have a license yet you can try out Qt commercial 30 days for free from this site – simply fill out the formular.

install_02

For small Startups or Independent Developers I recommend this new license. See here if you qualify.

install_03

You already have a Qt Account or bought a license ? Then log into your Qt Account and download from there.

install_qt_01

Installing Qt 5.6

Doubleclick the Installer. Here’s the one I got for OSX:

install_qt_02

Now follow the instructions. Only for the commercial version you must log into your Qt Account, but I recommend always to use your Account.

install_qt_03

You don’t have an Account ? You can create one directly from the Installer.

install_qt_04

install_qt_05

Select a folder where Qt 5.6 should be installed:

install_qt_06

Select the components you need.

install_qt_07

You should deselect all deprecated stuff, because we just start Qt development with 5.6

Also deselect the Cloud Services, because they will be discontinued.

Important: Qt Labs Controls (TP – Tech Preview) must be selected.

install_qt_08

Start the installation process and wait …

install_qt_09

It will need some time until you’ll get the message that Installation is finished.

install_qt_10

Congrats: Now Qt 5.6 is installed and you’re ready to start mobile development 🙂


← Back (Qt Community (Wiki, Forum, Lists))

→ Next Article (Patch Qt 5.6.0)

⇐ Home (Overview / Topics)