Qt 5.4 Release, detailed Android feature changes

Source: Internet
Author: User

December 10, 2014, Qt 5.4 is finally released! The Official blog post: http://blog.qt.digia.com/blog/2014/12/10/qt-5-4-released/.

Download Link: http://www.qt.io/download/.

Copyright Foruok, reproduced Please specify the source: Http://blog.csdn.net/foruok.

What are the changes in Qt 5.4

QT 5.4 brings a lot of changes, such as QT quick 2D renderer so that QT quick can not use OpenGL, and Qt webengine, ... See the following links for details:

    • http://blog.qt.digia.com/blog/2014/12/10/qt-5-4-released/
    • http://qt-project.org/wiki/New-Features-in-Qt-5.4
    • http://qt-project.org/wiki/Change-files-in-Qt-5.4.0
Some students are more concerned about 5.4 what problems, see here: Http://qt-project.org/wiki/Qt540-KnownIssues.


What's changed with Android support

This is my most concern, my book "Qt onAndroid core programming " has been listed for a period of time, 5.4 of the release brought about by the changes may lead to the reader in the study of the question, so I organized the changes related to Android for your reference.

In two parts, part of the SDK, part of the development environment Qt Creator.

Changes to the Qt SDK

There are some changes in the Qt SDK that are related to Android.

Android Native Style

5.3,5.2, Qt on Android developed APK, whether based on Widgets or Qt Quick, are not very good support for Android Native Style, for many students is a pity. The good news is that Qt 5.4 supports it! Look at the following links:

http://blog.qt.digia.com/blog/2014/12/03/native-android-style-in-qt-5-4/

About Qt Widgets on Android, in 5.3, if you use the Ministro service, a subset of the controls already support Android Native Style, such as Qlineedit, Qmessagebox, and so on. The 5.4 change is that Android Native Style has nothing to do with Ministro! You can also get Android native-style interface without Ministro.

About Qt Quick, 5.4 ago There is no Android Native Style, this time it is jump ah, very good.

In addition, Android version of the update is also very fast, the official version of the Android L released for some time! QT 5.3.2 has supported Android L preview, but there are a lot of work, Android L Material style, QT 5.4 is not supported ... The change is too big, how can people catch up and ... However, the gospel is still there, the world is not lack of tough people, look at the following link, based on Qt Quick from the zero-beginning realization of the Material style:

Https://github.com/7ymekk/qml-material

Also open source!

Changes to the release version

QT 5.4 is the first consolidated version of the QT company since its inception, and there have been some changes in the planning of the release version. Let's look at the instructions on the download page below:


Figure 1 Qt 5.4 Release

See no, four versions, three charges ... I support this strategy, the company will survive!

Community version, that is, the community version, there will be less feature support, look at the following pages of the instructions ... Here are the changes in the post-Installation Start menu:


Figure 2 Shortcut naming for the Qt 5.4 Community version

Compare 5.3.1 and 5.4.0, and watch for changes in the shortcut.

Qt on Android Known issues

Well, the SDK on the Android changes are finished, some worthy of expectation, such as video support based on Widgets, still does not come ... What's the problem, look at the following link:

Http://qt-project.org/wiki/Qt_for_Android_known_issues

Gee, Android 5.0 can't be debugged remotely ... But I basically didn't how to use the remote debugging, are debugging the interface and logic on Windows, Android real machine to see the actual performance, this is the Qt cross-platform brought big greatly convenient!

Changes in Qt Creator

With the QT 5.4 release is QT Creator 3.3.0, compared to the SDK introduced by the Android feature changes, Qt Creator on the Android convenient changes come more violent, trembling boy!

Changes to Project Options

5.3 and 5.2 carry the QT Creator version (3.2.x, 3.1.x), QT on Android app project options, such as signing, deployment strategy, create androidmanifest, really run configuration, actually not so reasonable, you think about it.

Qt Creator 3.3.0 this has changed. Is the build configuration:


Figure 3 Qt on Android build configuration

The Create Templates button in the figure, clicking on it creates the template files needed for the Android project, such as Androidmanifest.xml. Look at myQT on Android core programming (based on Qt 5.2, QT 5.3), when I find that I can't find the project setting options described in the book, notice the difference here.

In addition to the location changes, there are some new changes, such as the use Gradle in Advanced Actions, which will be said later.

Is the Run configuration:


Figure 4 Qt on Android Run configuration

Don't say more ...

Changes in the compilation system

Qt Creator is actually a tool chain that calls the Android-built app to compile and package the QT-on-Android so and the necessary Android project template files into APK. See my book, "Qt on Android core programming ", which is unclear. This process is basically transparent to the developer and does not need to be particularly concerned.

Android Project build There are several ways, the primitive people's way not to say, automation has ant, there are gradle, is said to improve productivity ha, according to the order I mentioned, one better than one OH. A few days ago Google released the 1.0 version of Android Studio, using Gradle to compile Android projects ...

Qt Creator 3.3.0 also supports the use of Gradle to build APK, while retaining support for Ant. We need to make some choices when we use them. Let's see what we can do.

    • Building with Gradle

Two steps, the first to create a template (created Templates) (See Figure 3 Red Box button, click to) Select Support Gradle, see Figure 5:


Figure 5 Support Gradle when creating an Android template file

After this is created, look at Figure 6, the project view changes:


Figure 6 Project view when building with Gradle

OK, the template is created, and the configuration options are built, as shown in 7:


Figure 7 Selecting Use Gradle in the build configuration

OK, now it's time to Run ...

Hey, swollen so slow ... Turns out, look at Figure 8:


Figure 8 compiled output information built using Gradle

Originally, Qt creator to automatically download Gradle for us, it may also be automatically configured well, I configured Gradle 2.2 last week. It took a lot of effort to compile my Android project, and then I installed Android Studio directly, saying Android Studio startup that's called a slow load that's called two slow Ah, like the last world ... Slower than Eclipse ...

I was impatient, canceled, didn't go down, decided to use Ant bar.

    • Build with Ant

Welcome back to the old road Oh.

Figure 9 is when creating the template:


Figure 9 using ant build to create a template to cancel support for Gradle

To create a project view after a template:


Figure 10 Project view when using Ant build

Look is not refreshing a bit ... I'm looking at the more beautiful I think ... I belong to tidying ...

Click Run ... to see the output information:


Figure 11 Compiling output information when using ant build

So much for the change in construction.

Changes in deployment policies

Because of the Android 5.0 reason, you know ...

See:


Figure Android 5 cannot use the Deploy local Qt libraries

A bit of a tragedy, Android 5, the developer friendly "deploy local Qt libraries to temporary dirrectory" This deployment strategy, actually does not work.

However, Qt Creator 3.3.0 is very friendly, gave us hints, the previous version is very willful, do not respond to us ...



Let's go here, let's pull the bar ...


Qt 5.4 Release, detailed Android feature changes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.