Published Thursday April 3rd, 2014 | by Kai Koehne
Qt provides several built-in ways to benchmark the runtime costs of code. Let’s have a quick glance at the most common ones.
There comes a time in every non-trivial application when performance starts to matter. In fact, it’s common for developers to pro-actively try to mitigate this by doing micro-optimizations, and aiming for optimized coding patterns based on ‘common wisdom’. However, hardware and compilers evolve, and soon you’ll get long discussions at the coffee machine about the best way to iterate, to pass arguments, and so on – and whether it matters in the end.
Wouldn’t it be cool to come up with some hard data in these cases? Qt provides a few simple ways to measure timing characteristics of code.
Qt Test library
The Qt Test library makes it very easy to create a benchmark. Even more so if you’re using the “Other Project/Qt Unit Test” project wizard in Qt Creator to let you generate the stub code that is needed. Then you’ve to just add the lines to be benchmarked inside the QBENCHMARK macro:
// code to benchmark goes here
When the Qt 5.3 beta was announced, we mentioned the upcoming release of our Qt Purchasing API for Qt Enterprise and Qt Mobile users. We now have a technology preview ready for you to try, and we’re really excited to hear your feedback.
The technology preview is available as a source package from the Qt Account, and the documentation is available online. For the final release (which will be out around the same time as Qt 5.3.0), we will also make binary packages available.
What is it?
The Qt Purchasing API contains cross-platform APIs that can enable in-app purchases in your Qt application. There are C++ and QML APIs available, and it currently supports both consumable and unlockable in-app products. The backends that are currently in place is for Android and iOS, but we’d like to add more later, such as the Windows Store and the Mac OS X Store.
Note that there are no source or binary compatibility guarantees for this technology preview, as one of the objectives of releasing it is to get feedback on the APIs. We want to ensure that the APIs we release match the requirements of our users as much as possible, so it’s possible that they change based on the feedback we get. Read more…
It’s been a while since Qt adapted git as its revision control system, and we’ve been experimenting with different branching models …
In Qt 4 (qt.git) we followed a scheme with one master branch, which gets forked into minor version branches (e.g. 4.8), which gets forked into patch branches (e.g. 4.8.1) … In the Qt 5 repositories we adopted a model where we had only three branches: dev, stable, release. This was aiming to make it easy for people to participate and submit patches, without having to worry too much about what’s right now the ‘right’ branch to submit. Read more…
I’m sure you are aware of the amazing annual gatherings for Qt enthusiast hosted in Berlin & San Francisco. But did you know we have other Qt Developer Day events around the globe as well? Qt’s popularity has been gaining in the Asian markets in the past year with a large following coming from Chinese-speaking countries and Japan, so we’re doing our best to bring the show to you.
Qt Developer Day China comes to Beijing, May 22 and to Shanghai, May 23. Registration is now open, so grab your free ticket today.
Lars Knoll, Qt CTO, on the Qt Path – Where We Are & the Technology Direction Ahead
Qt Powering Your Internet of Things Connected Device Strategy
Tech Talks, Training & Insights To Make You a Power User: Intro to Qt and Qt Creator, Intro to Embedded Development with Qt Enterprise Embedded, Deep Dive into Qt Quick and Qt Quick Controls, and much more…
Integrating Mobile Into Your Cross-Platform Strategy with Qt
Share your findings about these upcoming events with the community, and start your dialog and networking today.
I’m happy to announce that we have now released the Qt Enterprise Data Visualization add-on 1.0 final. The main focus after Beta release has been further improving the existing functionality, improving documentation and examples and of course introducing binary packaging for easier installation to development environment.
As a recap of the functionality Qt Data Visualization includes:
Multiple data visualization options: 3D Bars, 3D Scatter, and 3D Surface
2D slice views of the 3D data
Interactive data: rotate, zoom, and highlight data using mouse or touch
Uses OpenGL for rendering the data
Qt C++ and Qt Quick 2 supported
Customizable axes for data – control viewable data window with axis ranges
Customizable input handling
Multiple options for data formats and fully customizable data proxy model
The Qt installation packages contain Qt for Android libraries and useful tools for developing Qt apps for Android devices. However, you will need to install the Android NDK and SDK, and some other tools yourself and configure them for use with Qt Creator.
In this blog post, we’ll walk-through the Qt for Android development process, from the environment set up to the deployment to the store. These details are also available in the official product documentation: Qt documentation.
Besides the developement process, we will also discuss a few platform-specific findings that might be useful.
Setting Up the Environment
The getting started documentation gives you the setup instructions. Where to get the Android SDK, NDK, Apache Ant and JDK (or openJDK), and on Windows the additional minGW and Android Debug Bridge driver links. Read more…
Great News! Qt 5.3 Beta is now available for download. Qt 5.3 Alpha was released about 3 weeks ago and I am really happy to announce that we now have the Qt 5.3 Beta with updated functionality and binary installers.
Qt 5.3 is mainly focusing on quality and performance improvements, but we also have a nice set of new features available. With Qt 5.3 Beta we are introducing Beta support for Windows Runtime with final support for the platform coming in Qt 5.4. In addition, Qt 5.3 Beta also provides VS2013 binary installers.
Highlights of Qt 5.3 Beta include:
New QQuickWidget providing improved integration between Qt Widgets and Qt Quick
New Qt WebSockets module got added featuring full support for the web socket protocol (RFC 6455)
Major improvements to printing support
Major improvements for iOS and Android ports such as:
Better input method support for iOS (including also Chinese),
Positioning support for Android and iOS
Bluetooth for Android
… and many more
Support for Windows Runtime platforms: Windows 8/RT (Modern UI), Windows Phone 8
New target binaries: Qt for VS2013 (32 and 64 bit, OpenGL and Angle), as well as Qt for WinRT and Qt for Windows Phone
We’ve been hard at work on the Windows Runtime (WinRT) port and it’s about time we share a bit with all of you. For Qt 5.3, we’re releasing the WinRT port as Beta quality, with most of the Qt Essentials modules in functional form (including QML & Quick). We also have preliminary tooling support, so you can get started on WinRT as quickly as you would on any other supported Qt platform.
An API for modern devices
As a reminder, Windows Runtime is a new API largely tied to Windows Store Apps, or applications which run within the Modern UI environment. It has C++ bindings (among other languages), and can be used on Windows 8, Windows Phone 8, and Windows RT – running the gamut from budget smartphones to high-end PCs. That’s a lot of devices.
One of the most important things for us (and many of you) has been getting Qt Quick working smoothly on the platform. As you might guess, there are some limitations to getting such a stack working here. For one, the memory APIs which are commonly used by just-in-time (JIT) compilers (such as in QtQml’s virtual machine engine) are restricted and cannot be used by apps in the Windows Store (this is, of course, for platform security reasons; the same restriction is in place on iOS). Fortunately, the V4 virtual machine which premiered in Qt 5.2 has solved this problem swimmingly, allowing WinRT to utilize the interpreted codepath for these types of operations (albeit at the cost of some less optimal code execution speed). Read more…
This year the summit will be organized in the Estrel Convention center in Berlin on 10-11th June.
The break area is waiting for coffee break discussions!
Participation to the event is limited and based on merit in the Qt Project. Priority is given to Maintainers and Approvers, but everyone who has contributed to the success of the project in any way can apply for an invitation.
The Qt Blog provides you with one area for all Qt development posts from our Qt engineering experts. It includes information on projects in the works, tips and tricks, technical release information and more from our pool of very clever Qt developers.