Install Qt 5.8

February 28, 2017 — Leave a comment

Qt 5.8 Release Blog from Qt

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.8 you’ll also get a new Qt Creator 4.2.1

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.8 (commercial):

Install Qt 5.8

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

01_download_01

 

See available downloads:

qt58_download

 

I selected the macOS online installer:

qt58_download2

Here’s my download on OSX:

qt58_download3

Double click to install:

qt58_download4

Log into your Account:

01_download_04

Select the folder where to install:

qt58_download5

It’s a good idea to use installation pathes without spaces. see also here.

As next select your components:

qt58_download6a

please notice: some components from commercial are now included into the open source part.

qt58_download6b

and wait for the installer:

qt58_download7

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

qt58_download8

 

 

Start Qt Creator with -settingsPath

All Qt Creator instances by default share the settings. Having the new Qt Creator 4.2.1 and old 4.0.2, 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 and the new Qt 5.8 Release.

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

Search for the Qt Creator.app from Qt 5.8 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.

something like this:

#!/bin/sh
exec "/daten/_qt_sdks/sdk_580/Qt Creator.app/Contents/MacOS/Qt Creator-bin" -settingspath /daten/_qt_sdks/sdk_580/qtc_settings "$@"

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:

qt58_creator-prefs

 

Qt Creator will create the QtProject folder to sthore all the configuration settings.

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

Qt Creator 4.2.1

At first I’m changing QtCreator’s language on my german MacBookPro to english and restart

04_qtc_prefs_01

Select your Theme. I’m using the Flat Theme:

03_qtc_flat_03

Qt Creator Preferences Working Directory

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

qt58_creator-workspace

Qt Creator Preferences Android

Take a look at your Devcies -> Android preferences:

qt58_creator-android_prefs1

 

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

qt58_creator-android_prefs2

Important: Don’t use a newer NDK ! Please always use r10e because of some trouble with the newer ones.

 

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.8 –> clang_64 –> bin:

06_qtc_ext_tools_01

(similar screenshots from 5.-7)

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.8 –> 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 use the executable from …/5.8/clang_64/bin:

06_qtc_ext_tools_04

06_qtc_ext_tools_05

(similar screenshots from 5.7)

Test if Linguist will start. From External Tools

06_qtc_ext_tools_06

Linguist should start:

qt58_creator-ext-linguist

it’s a good idea to use a shortcut:

qt58_creator-shortcut-linguist

 

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 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. Even if you only develop mobile apps it’s a good idea also to check the ‘Desktop’. Most mobile apps also run on OSX and the build-run-cycle is much faster- (Thx @jpnurmi for this tip – saved me much time)

qt58_creator-configure-gallery

 

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

Congrats –  you have installed Qt 5.8.  Now you can try out all the new Controls.

Patches / Bugs

ATTENTION: There’s a critical bug using some controls on Android 6 or Android 7: QTBUG-59026

Also there’s a bug with Ripple Effect in Drawer on Android and iOS: QTBUG-59293

Fortunately Qt is Open Source 🙂 With some help by @jpnurmi here are some patches to make it run:

If you already have projects using Qt 5.7 – take a look what’s good to know if moving projects from 5.7 to 5.8

New to Qt for mobile ? Here are 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)

No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s