Posts

Using QtOpenCL with Qt5

Bild
In the age of Qt4, there was an experimental support for easily using OpenCL together with Qt: QtOpenCL. These days, you normally using Qt5 for your projects and unfortunately, QtOpenCL was not supported with Qt5. I'm happy to annouce that you can now use the original QtOpenCL module together with Qt5. The changes have been quite easy, I just had to transfer it to a Qt5 module from *.pro-files point of view. QtOpenCL internally consists of two sepereate modules: QtOpenCL and QtOpenCLGL. The first is for general OpenCL usage, the second one can be used for mixing OpenCL and OpenGL. Build the module # git clone https://github.com/jsee23/qtopencl.git # cd qtopencl # qmake # make # make install Using the module Adding the module to your *.pro file: # ... # QT += opencl # ... You then can use the QtOpenCL headers by #include <QtOpenCL/...> . Using the examples/demos You will find several examples inside the QtOpenCL module. vectoradd is a good starting poi

Introducing QtLocalAuthenticator

You are creating a mobile application with Qt and want to secure the access to some content? You want to use the Touch ID on iOS based devices? Then you should take 2 minutes and read on :) QtLocalAuthenticator I have created a small git repository with a Qt C++ module and a QML module around the native LocalAuthentication class [ 1 ]: https://github.com/jsee23/qtlocalauthenticator What is possible: C++ and QML support setting the authentication policy: biometric and password OR just biometric setting the authentication reasion: shows a text to the user why you want to use the authentication check if the device supports the authentication policies, e.g. check if Touch ID is available How to use? Clone or download the code, open a terminal and switch to the source code location. Then, compile and install the modules: [<Path-To-Qt-Installation>/bin/]qmake make make install If you have an existing QML application, import the module: import js

Building QtWebKit Technology Preview 5 from Sources

Bild
Updates for the QtWebKit module were dropped by the Qt Company after switching to the Blink-/Chrome-based QtWebEngine module. After years of development, there is still a lack of features that where available in the original QtWebKit module. Because of different reasons , some guys started to update the QtWebKit module with fresh code from the WebKit repositories. What you don't expect: WebKit is really alive and has implemented a bunch of new web features . Last week, the Technical Preview 5 was released [1] . It should be compatible with any recent Qt5 version, in the following chapters you will see how to build it from source or how to use the pre-built binaries for Qt5.8. 1. Build QtWebKit TP5 from sources 1.1. download & extract QtWebKit TP5 sources The release page of QtWebKit TP5 contains the source code package for building the module by yourself. Download it  [2] . On Mac  & Linux, extract the sources and change to the directory: $ tar xf qtwebkit-tp5.ta

Native Look-and-Feel on Windows 10 Mobile with Qt / QML

Bild
The goal for today: create a QML app for Windows 10 Mobile, with a native look-and-feel! The goal Because this should be just about the UI and its QML items, I took an existing Windows 10 Mobile app and "copy" its UI, to see how we can achieve it with QML. The app to "copy" is the Alarm & Clock app: The UI has, beside the common Modern UI controls, 3 major elements: a sticky header with a toolbar, button with icons + text Swipe-able subpages every subpage has its own AppBar [1]  with different icons and entries The tools For the implementation, I'm using Qt 5.6(.0). Why? There are two main reasions. The first reason  is a new QML extension called "Qt Labs Controls" (see chapter "Further notes"), which makes it very easy to write re-usable UI controls with QML. The Qt Labs Controls are the successor of the QtQuickControls1 module, which is present since the early Qt5 days. QtQuickControls1 had many issues when it

Qt5.4 Beta, QtQuickControls and changing Android theme

Bild
Qt5.4 is coming closer...currently, 5.4 is in the Beta state. So today, I downloaded the Beta for Android on Windows and tried some things out. In a previous post, I showed the new Android-style for the QtQuickControls module. Today, we will look how we could change the theme in a Qt-app on Android. So, changing the theme....a Qt guru may think this will work with the QPalette class. With QPalette, you can define the background color, text color, ... in a platform-independent way. But QPalette won't be a good choice for Android... On Android, we're facing a different, but very famous problem: the "Android fragmentation". Qt is supporting a minimum Android SDK version 10, current SDK version is 21 a.k.a. "Lollipop". (by the way: QtQuickControls style for Android is working for SDK version 11+) During the SDK version, the style of the native controls changed a lot! So, "native look-and-feel" on SDK v10 is very different than "native look

QtQuickControls style for Android in Qt5.4 - First touch

Bild
With the upcoming release of Qt5.4 in October, developers have now the chance to use QML components with Android-native look-and-feel. As the QWidget-module have an Android style a long time ago, QML and its QtQuickControls-module will follow now! I compiled the pre-Alpha state of Qt5.4 and take a look at the Android style. So, I compiled these modules for android: qtbase qtdeclarative qtquickcontrols Try it on your own or wait until the Beta release of Qt5.4 (sheduled to 4th September 2014), which will ship out binary installers (no compiling work for you!). Then, create a simple QtQuick/QML app, which includes some control elements like Button, Slider, Menu, etc. Alternative, you can clone J-P Nurmis's git repo "catalog" (https://github.com/jpnurmi/catalog), a small example app which show every control element. (By the way, J-P Nurmi created the Android style....thanks!) Hereare two screenshots of my "helloandroid" app on my Amazon Fire HD:

Qt5 on Windows Phone - Current State

Bild
It's been some time since my last post, today I'm posting again about the state of the Qt-framework on Windows Phone. Remember, Digia and the qt-project are currently working to port their famous C++ framework Qt to WinRT (= Windows Runtime). This port includes to targetting Windows 8 Apps on desktop machines and tablet (including Windows RT on ARM cpus) AND Windows Phone 8. In december 2013, Digia presented a technology preview of the WinRT port [1]. During this time, only a few parts of the qtbase module worked. But on 27th feburary 2014, they released the Alpha of Qt5.3, with a testable version of the Qml/Quick modules on WinRT. At the same time, they released QtCreator 3.1 Beta, with an experimental version of a QtCreator-WinRT-plugin, which imply: you can develop apps for Windows Phone 8 with QtCreator. So I decided to give it another try! First, I downloaded the Alpha sources on qt-project.org, but: don't do this! There are to many changes during that release, on