Release 2.8.4: Google Cloud Messaging Integration & Game Engine Improvements

V-Play 2.8.4 is out now as a free update for all V-Play users. A highlight of this update is the addition of the Google Cloud Messaging Plugin to V-Play Plugins.

The Google Cloud Messaging Plugin is another alternative to the retiring Parse service and is available with the V-Play Indie and Enterprise Licenses. Get the latest version of V-Play and you can also enjoy improvements to V-Play Apps and the V-Play Game Engine.

Update Now!

If you’re not an existing V-Play user and you’d like to make cross-platform apps and games, you can download the SDK for free.

Google Cloud Messaging

Google Cloud Messaging is a service for sending push notifications and has emerged as an alternative to the soon-to-be discontinued Parse service. With the GoogleCloudMessaging item, V-Play Indie and Enterprise License holders will be able to send push notifications to individuals and targeted groups of users.

Google Cloud Messaging - V-Play 2.8.4
Push notifications are a great way to keep your users engaged and inform them of changes to your app or game. Push notifications are triggered from server-side logic so Google Cloud Messaging includes a push backend for delivering notifications from a custom web service.

These notifications are best suited for apps where you need to inform users about externally triggered status updates. This can include sports live ticker apps, social messaging apps or any app that delivers real-time info.

For a complete rundown on how to integrate Google Cloud Messaging or how to migrate from the Parse service, check out the Google Cloud Messaging documentation.

Note: An upcoming blog post will detail the future of using push notifications, such as Parse, OneSignal, Amazon SNS and Firebase, with V-Play and Qt!

Game Engine Improvements

The major change to the V-Play Game Engine with this update is a number of improvements to the V-Play Game Network’s default styling. The V-Play Game Network has gotten a makeover which includes an updated look for buttons and makes the header clickable for back navigation.

This V-Play update also includes a fix on some Android devices when displaying rounded user images in VPlayGameNetworkView.

V-Play Apps Improvements

When working with V-Play Apps, you now have the ability to disable the platform emulation feature. You can disable the debug menu bar with the App::menuBarVPlayEnabled property.

Platform Emulation Feature - V-Play 2.8.4

The debug menu bar allows you to view your app at different screen resolutions and gives a preview on how it will appear on iOS or Android devices. By default, the menu bar is only enabled for publishing builds on desktop platforms.

Plugin Fixes

V-Play 2.8.4 includes a fix for the Notification plugin that can be used to send local push notifications. This update fixes a possible crash when the NotificationManager item is not used from within the root item of a project.

How to Update

Test out these new features by following these steps
Step 1

Open the V-Play SDK Maintenance Tool in your V-Play SDK directory. Choose “Update components” and finish the update process to get V-Play 2.8.4 as described in the V-Play Update Guide

If you haven’t installed V-Play yet, you can do so now with the latest installer from here.

Step 2

The V-Play Sample Launcher allows you to quickly test and run all the open-source examples and demo apps & games that come with the V-Play SDK, from a single desktop application.

After installing V-Play, you can start the V-Play Sample Launcher from the application shortcut in your V-Play SDK directory.
V-Play Sample Launcher
Now you can explore all of the new features included in V-Play 2.8.4!

For a complete list of the changes to V-Play with this update, please check out our change log!

The post Release 2.8.4: Google Cloud Messaging Integration & Game Engine Improvements appeared first on V-Play Engine.

The Qt Company acquires ISO 9001:2008 certificate

It is our great pleasure to announce that The Qt Company was granted the ISO 9001:2008 certificate in March 2016. This means we have met the requirements in ISO9001:2008 and that our management system and processes have been certified to this internationally recognized quality management standard. Certification covers all our main operations globally.

Quality is very important for us and something we constantly want to improve and everything starts from having well-defined high-quality processes in place.

Being ISO 9001:2008 certified guarantees that we have an effective Quality Management System (read: set of processes that are needed to run our business) and that we are making continuous improvement to our way of working by listening to our customers, conducting audits and measuring our operations.

Ultimately, the goal of everything around our processes is to be enable the creation of Qt products that meet customer expectations, which are of the highest quality. We have now taken one important step down that path.

qt iso9001 cert

The post The Qt Company acquires ISO 9001:2008 certificate appeared first on Qt Blog.

Swift 3.0: File Transfer and Keyword Highlighting

Swift 3.0 was released a couple of months ago and we’ve had lots of feedback from users, so we’d like to start off this blog post by thanking you all for this, we never tire of hearing how great Swift is!

Many new features were introduced in 3.0, a list of which can be found in the changelog, but today we would like to bring your attention to two of those: File Transfe r and Keyword Highlighting.

File Transfer

Swift can now transfer files via the ‘Jingle File Transfer’ protocol. We’ve made it nice and east to start transferring files to your contacts, simply drag the required file onto an open chat and voilà.

File Transfer

Keyword Highlighting

Keyword highlighting is now supported in Swift, this allows users to setup Swift to alert them to activity that matches their configured highlighting rules. This was described in a previous blog post. To get started use the “Edit Highlight Rules” menu item and set your required rules.

Keyword Highlight

Very explicit operator bool

From time to time I scroll through Qt-related forums and mailing lists, and whenever possible I try to help fellow developers out. The other day a StackOverflow thread caught my attention: a developer was asking “What is the purpose of operator RestrictedBool in QScopedPointer?”

Indeed, looking at QScopedPointer‘s implementation, one notices the strange RestrictedBool usage. Removing the other code, the bulk is:

template <typename T, typename Cleanup = QScopedPointerDeleter<T> >
class QScopedPointer
{
    typedef T *QScopedPointer:: *RestrictedBool;
public:
    inline operator RestrictedBool() const
    {
        return isNull() ? Q_NULLPTR : &QScopedPointer::d;
    }

    inline bool isNull() const
    {
        return !d;
    }
protected:
    T *d;
};

What is the reason for all of this machinery? The answer is quite simple: to make QScopedPointer usable in a boolean context. Thanks to the above we can write in our code:

QScopedPointer<int> sp;
if (sp) { ... }

Is that complicated implementation necessary to realize this? Unfortunately, it is, and the reason is rather cryptic and historical, so let’s start our journey…

Conversion operators

In C++98, it was already possible to write custom conversion operators for our classes, to allow their objects to be converted to other types. Since we’re interested in conversions to bool, given a type T, we can write an operator bool to convert it to a boolean:

struct T {
    operator bool() const { return true; }
};

This allows the usage of objects of type T whenever a boolean is expected:

T t;
if (t) { ... }
do { ... } while (t);
bool ok = t;

This is great, right? Unfortunately, not so much. One of the most prominent mis-features of C++ is the ability to happily convert and promote primitive types. In particular, bool has an implicit promotion towards int, causing any boolean to be promoted to 1 or 0 if true or false, respectively.

This unfortunately applies to our type as well. It is therefore legal to write code like this, although it does not make any sense:

T t;
int i = t;
t >> 4;
if (t < 42) { ... }
AnotherClassWithOperatorBool t2;
if (t == t2) { ... }

The Safe Bool Idiom

Since this is detrimental to type safety, people have come up with an ingenious solution which goes under the name of the Safe Bool Idiom, exploiting the fact that integer promotions and pointer arithmetic are disabled for pointers to data members and pointers to member functions, but they’re still testable in a boolean context.

Our type T can therefore be rewritten as:

struct T {
private:
    typedef void (T::*bool_type)() const;
    // or, in C++11:
    // using bool_type = void (T::*)() const;
    void some_unused_function() const;
public:
    operator bool_type() const {
     // return &some_unused_function if true,
     // return nullptr if false
    }
};

And now T instances are still usable in a boolean context, but without the dangerous promotions and conversions. This is the same trick used by QScopedPointer and by many other classes in Qt, such as the other Qt smart pointers (QScopedPointer actually uses a pointer to a data member instead of a pointer to a member function).

Enter Modern C++

In C++11 the operator conversion functions gained an interesting feature: they could be marked explicit, just like we could mark constructors in C++98. The idea was indeed filling the semantic gap of implicit conversions between two types: while one could disable an implicit conversion by means of an explicit constructor, one couldn’t do the same for an operator conversion function, which was always implicit.

This means, for instance, in C++98 we could do this:

struct A {};

struct B {
    explicit B(const A &);
};

void f(const B &);

// it is _not_ possible to implicitly convert a A to B
// because of the explicit constructor. This will fail:
A a;
f(a); // error: implicit conversion requested

However, we could not disable this implicit conversion:

struct D {};
struct C {
    operator D() const;
};

void f(const D &);

// since the conversion operator from C to D is implicit,
// it is legal to write:
C c;
f(c); // works: operator D() is implicit

This asymmetry was closed in C++11 with the introduction of explicit conversion operators, which forbid implicit conversions but still allow explicit ones:

struct D {};
struct C {
    explicit operator D() const;
};

void f(const D &);

C c;
f(c); // error; requires explicit conversion
f(static_cast<D>(c)); // works

Explicit operator bool

A direct application of an explicit conversion operator is defining an explicit operator bool for our class, with the hope that it would disable the unwanted integral promotions. For instance, we could write something like:

struct T {
    explicit operator bool() const { return true; }
};

This, indeed, makes our type system much, much better:

T t;

bool b1 = t; // fails to compile, implicit conversion

bool b2(t); // works, explicit conversion
bool b3{t}; // works
bool b4 = (bool)t; // works
bool b5 = static_cast<bool>(t); // works

int i = t; // fails to compile
int i(t); // fails to compile
t + 42; // fails to compile

How about a statement like if (t)? Does that trigger implicit or explicit conversion?

Well, neither. According to the Standard it actually triggers a contextual conversion to bool, which in practice means an explicit conversion (the exact wording is in §4.0.4 [conv]).

There are many places scattered around the Standard where such a “contextual conversion to bool” will happen:

  • in the guards of the if, while, do/while, for statements;
  • in the ternary operator condition;
  • for the arguments of the logical and (&&), or (||) and not (!) operators;
  • for the first parameter of static_asserts;
  • for the argument of the noexcept operator;
  • … and some other places around the STL, mostly involving algorithms predicates.

Back to hacking Qt

How does this apply to our original issue with QScopedPointer?

Since Qt 5.7 requires C++11, I have decided to have a try at getting rid of the Safe Bool Idiom and replacing it with an explicit operator bool. After all, at KDAB we love hacking, and Qt is our favourite codebase :-).

From that, I learned an important lesson: there are at least two things that you could do with the Safe Bool Idiom that you can’t do out of the box with explicit operator bool.

Comparison against literal 0

Consider this code:

T t;
if (t == 0) { ... }
if (0 == t) { ... }

This compiles and works with the Safe Bool Idiom, because 0 gets promoted to the null pointer, and the comparison happens between pointers. But this same code fails to compile with an explicit operator bool, because of the disabled promotion from boolean to integral.

The workaround I have found (which, at least, can be applied and makes total sense if T is a smart pointer class) is that you can add comparison operators against nullptr_t, triggering therefore a conversion from 0 to nullptr:

bool operator==(const T &lhs, std::nullptr_t) { return lhs.isNull(); }
bool operator==(std::nullptr_t, const T &rhs) { return rhs.isNull(); }

In case T is not a smart pointer class of sorts, I’m not 100% sure of a viable strategy, but I could argue that code that did t == 0 was very questionable in the first place…

This first workaround got implemented here in Qt.

Functions returning bool

Again, consider this code:

struct S {
    T t;
    bool isValid() const { return t; }
};

This works if T implements the Safe Bool Idiom, but fails to compile with explicit operator bool. The sad truth is that return statements use implicit conversion, not contextual conversion to bool (§ 4.0.2.4 [conv]). I’m quite surprised that this issue happily slipped through the Standard, but this is the way it is.

I do not see how to overcome this in an API compatible way, so this blocked my efforts of getting rid of the Safe Bool Idiom in Qt. In the meanwhile, the patch for QScopedPointer, QSharedPointer and QWeakPointer (which works, modulo these API breaks) is available here.

Conclusions

What have we learned? Well, we now know how the C++ type system gets better and better despite its roots in the C world, and we know why many classes in libraries employ this strange pattern for providing conversions to bool. We have also learned that explicit operators are not a replacement for the Safe Bool Idiom. And while doing that, we have improved the code of our favourite UI toolkit. Most importantly, we’ve had lots of fun!

The post Very explicit operator bool appeared first on KDAB.

Fast-Booting Qt Devices, Part 3: Optimizing System Image

It is now time for the third part of the fast-boot blog post series. In the first post we showed a cluster demo booting in 1.56 seconds, in the second post we opened up how the Qt application was optimized. Here, we will concentrate on the optimization of boot loader and kernel for NXP i.MX6 SABRE development board which was used in the demo.

Before even starting the boot time optimization I measured the unoptimized boot time which was a whopping 22.8 seconds. After measuring we set our goal to get boot time under 2 seconds. Now that the goal was set. I started the optimization from the most obvious place: root-fs. Our existing root-fs contained a lot of stuff that was not required for the startup demo. I stripped down the whole root-fs from 500 MB to 24 MB. I used buildroot to create a bare minimal root-fs for our device and a cross-compile tool chain.

After switching to the smaller root-fs, I did a new measurement of the startup time which was now 15.6 seconds. From this 15.6 seconds kernel, startup took around 6 seconds, the U-Boot bootloader and the unmodified application the rest. Next, I concentrated to the kernel. As I already knew the functionality required by the application, I could easily strip down the kernel from 5.5 MB to 1.6 MB by removing nearly everything that was not required. This got the boot time to 9.26 seconds out of which the kernel startup was taking 1.9 seconds.

At this point we still had not touched the u-boot at all, meaning it had the default 1 second wait time and integrity check of the kernel in place. So U-Boot was next obvious target. Inside U-Boot there is special framework called secondary program loader which is capable of booting another U-Boot or specially configured kernel. I enabled the SPL mode and modified my kernel to include command line arguments and appended my device tree to the kernel. I also stripped down the device tree from 47 KB to 14 KB and disabled console. Boot time was dropped to 3.42 seconds where kernel was taking 0.61 seconds and U-Boot + application rest.

Now that the basic system (u-boot and kernel) was booting already in a decent time, I optimized our cluster application. Start up of the application was changed to load the cluster frame first and then animate in gauges and last the 3D car model as described in our previous post. Boot time was still quite far away from the 2 second target so I did more detailed analysis of the system. I was using class 4 SD card which I changed to class 10 card.

My Qt libraries were still shared libraries so I compiled Qt as static libraries and recompiled our cluster demo using the static version of Qt. This also allowed me to remove the shared libraries from the root-fs. Using static linking makes startup of application faster since operating system do not need to solve symbols of dynamic libraries. With static linking I was able to get the cluster application into one binary with size of 19 MB.  This includes all the assets (3D model, images, fonts) and all the Qt libraries required by the demo.  I actually forgot to use the proper optimization flags for my Qt build so I set optimization for size and removed fpic as a result executable size was reduced to 15 MB. I also noticed that having the root-fs on the eMMC was faster than having it on SD card.

However, having the u-boot and kernel image on SD card was faster than having both in eMMC, so I ended up to a bit weird combination where CPU is loading u-boot and kernel from SD card and kernel uses root-fs from eMMC. Kernel was still packged with gzip. After testing out UPX, LZO and LZ4 I changed packing algorithm to LZO which was fastest on my hardware. Depending on hardware you might want to test other algorithms or having no packing at all.  After changing the packing algorithm and removal of serial console the kernel image size was dropped to 1.3 MB. With these changes the boot time was reduced to 1.94 seconds.

If this would be a production software there is still work to be done in the area of memory configuration. U-boot should be debugged to understand why it takes more time to power up and load the kernel image from eMMC rather than from SD card. In general if quick startup time is a key requirement, the hardware should be designed accordingly. You could have small very fast flash containing the u-boot & kernel directly accessed by the CPU and then having the root-fs a bit slower flash like eMMC. 

Even tough I succeeded to get under 2 seconds I still wondered if I could make it faster. I stripped down the kernel a little bit more by removing the network stack ending up to 1.2 MB kernel with appended device tree. I also ran prelinking to my root-fs because the Vivante drivers come as modules, so I was not able to create static root-fs. I also striped the u-boot spl part a bit, initially it was 31 KB and after removing unwanted parts I ended up with 23 KB boot loader. With these final changes I was able to get the system to boot up in 1.56 seconds.

As a wrap-up here is how the boot time was reduced by different means.

chart2

Last thing that will also affect the boot time is hardware selection. There is a difference between the boards how fast they power up even if they are using the exact same CPU. Perhaps later something more about this.

Do:

  • Measure and analyze where time is spent
  • Set target goal, as early as possible
  • Try to reach the goal early in the development and then keep the level throughout development
  • When designing your software architecture take into account the startup targets
  • Optimize easy parts first, then continue to the details
  • Leverage static linking if that provides better result in your SW & HW configuration
  • Take into account your hardware limitations, preferably design the hardware to allow fast boot time

Do not:

  • Overestimate the performance of your selected hardware. i.MX28 will not give you iPad-like performance.
  • Complicate your software architecture. Simpler architecture runs faster.
  • Load things that are not necessary. Pre-built images contain features for many use cases, so optimization is typically needed.
  • Leave optimization at the end of the project
  • Underestimate the effort required for optimizing the very last milliseconds

So, that concludes our fast-boot blog post series. In these three posts, I showed you that Qt really is up for the task: It is possible to make Qt-powered devices to boot extremely fast to meet industry criteria. It’s actually quite manageable when you know what you’re doing but instead of one silver bullet, it’s a combination of multiple things: good architectural SW design, bunch of Qt Quick tips’n’tricks, suitable hardware and a lot of system image optimization. Thank you for following!

 

The post Fast-Booting Qt Devices, Part 3: Optimizing System Image appeared first on Qt Blog.

Building Digital Instrument Clusters with Qt on QNX

The Qt application framework is widely used in automotive infotainment systems with a variety of operating system and hardware configurations. With digital instrument clusters becoming increasingly common in new models, there are significant synergies to be gained from using the same technologies for both the infotainment system and the cluster. To be able to do this, you need to choose technologies, such as Qt and QNX, that can easily address the requirements of both environments.

I have written a guest blog post for the QNX Automotive blog about synergies building also the digital instrument cluster in addition to the in-vehicle infotainment system with Qt – please check it out at qnxauto.blogspot.com.

The post Building Digital Instrument Clusters with Qt on QNX appeared first on Qt Blog.

Qt on Android: How to use Android Toast

To get you started on this, we’ll be using KDAB’s Android utils with the humble Toast. Toasts are small popups which are used to show the user some feedback. Check Google’s API guide for more info about toasts.

The easiest way to show a toast is to use Toast.makeText(Context context, CharSequence text, int duration) static method. This method needs 3 params:

  • the context (we’ll use the activity)
  • the text to show
  • and the duration: one of LENGTH_SHORT (0) and LENGTH_LONG (1).

Then we just need to call the show method.

Of course all the calls MUST happen on the Android UI thread.

As usual we’re going to make use (abuse) of QtAndroidExtras and KDAB’s Android utils (check this article to see how to add them to your project).

Let’s create a simple function to show the toast:

enum Duration {
    SHORT = 0,
    LONG = 1
};

void showToast(const QString &message, Duration duration = LONG) {
    // all the magic must happen on Android UI thread
    KDAB::Android::runOnAndroidThread([message, duration] {
        QAndroidJniObject javaString = QAndroidJniObject::fromString(message);
        QAndroidJniObject toast = QAndroidJniObject::callStaticObjectMethod("android/widget/Toast", "makeText",
                                                                            "(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;",
                                                                            QtAndroid::androidActivity().object(),
                                                                            javaString.object(),
                                                                            jint(duration));
        toast.callMethod<void>("show");
    });
}

Yep, it’s that simple!

Now let’s take a closer look at the code:

  • We’re using KDAB::Android::runOnAndroidThread to run everything on the Android UI thread.
  • We’re capturing message and duration params as values not as references, because as we’ve seen in a previous article KDAB::Android::runOnAndroidThread is (most of the time) asynchronous.
  • We’re using QAndroidJniObject::fromString to convert a QString to a QAndroidJniObject string object.
  • We’re using QAndroidJniObject::callStaticObjectMethod to call the makeText static method that returns a Toast java object. We need to pass the following parameters:
    • “android/widget/Toast” is the fully qualified class name.
    • “makeText” is the static method name
    • “(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;” – is the method signature. The method returns Landroid/widget/Toast; object and expects 3 arguments:
      • Landroid/content/Context; – a Content object
      • Ljava/lang/CharSequence; – a CharSequence object
      • I – an int
    • QtAndroid::androidActivity().object(), javaString.object(), jint(duration) are the makeText arguments.
  • after we get the toast object, we call show method and we’re done.

Enjoy!

showToast(QLatin1String("Hello from Qt"));

The post Qt on Android: How to use Android Toast appeared first on KDAB.

KDAB Training Day at QtCon

Berlin, September 1-4

KDAB is offering eight fantastic trainings at QtCon, each for just €250 a day, so incredibly good value.
Here’s what you can choose from, including three completely new courses:

  1. Introduction to Qt 3D – with Dr Sean Harmer
  2. Basic and Modern CMake – with Andreas Hartmetz
  3. Beyond code – Improved Quality through User Centric Development – with Björn Balazs
  4. Debugging and Profiling Qt applications – with Milian Wolff
  5. Introduction to QML – also known as Qt Quick – with Kevin Funk and Jesper Pedersen
  6. What’s new in C++11/C++14 – with Thomas McGuire
  7. Introduction to Modern OpenGL with Qt – with Giuseppe D’Angelo
  8. Introduction to Testing Qt applications with Squish – with Florian Turck

Abstracts

1. Introduction to Qt 3D – Dr Sean Harmer

Target Audience: Developers or Managers wishing to get an idea of what Qt 3D is about and learn how to make some attractive applications with 3D content in the process.

Prerequisite: A basic understanding of QML would be useful. No prior OpenGL or 3D experience is required.

Qt 5.7 introduces the powerful new Qt 3D module that can be used to integrate 3D content into your Qt applications using C++ or QML. In fact, Qt 3D provides an extensible framework for soft realtime simulations, of which rendering is just one aspect. This 1 day training will introduce you to Qt 3D’s features and APIs, show what you can achieve with them, and how Qt 3D can be extended by the user and by the Qt 3D authors in the future.

Along the way we will introduce the Qt 3D renderer and input systems and how they are built on top of a flexible, highly threaded, Entity Component System (ECS) architecture that scales very well and is ripe for future additions. You will learn:

  • How to construct a basic Qt 3D application
  • About Transform hierarchies and Entities and Components ot make a scene graph
  • How to display 3D graphical content using geometry, materials, textures
  • How Qt 3D maps onto the graphics pipeline
  • How to extend Qt 3D to use your own custom geometry
  • How to write custom materials and shaders
  • How to completely control the Qt 3D renderer dynamically at runtime using the Frame Graph
  • How to integrate Qt 3D with Qt Quick to provide a 2D user interface
  • How to handle advanced input with Qt 3D
  • Future plans for Qt 3D and how to extend it yourself

About the presenter

Dr. Sean Harmer
Senior Software Engineer at KDAB. Sean has been developing with C++ and Qt since 1998. and in a commercial setting since 2002. He holds a PhD in Astrophysics along with a Masters in Mathematics and Astrophysics. Sean has a broad range of experience and is keenly interested in scientific visualization and animation using Qt and OpenGL. 


2. Basic and modern CMake – Andreas Hartmetz

Target Audience: C and C++ Developers

Prerequisite: Experience with build systems
(well I guess – otherwise trainees will not know what problems even need
solving, so they won’t understand what the solutions are good for)

The best thing a build system can do is not get into the way.

CMake is the de facto standard build system for C and C++ outside of frameworks that require their own. It has earned this place by supporting the situations and special cases that arise in real projects.
CMake even has strong support for building Qt applications, and it’s a good alternative if you hit limitations in qmake.

This course will teach the basics of creating and building projects with CMake. In recent years, CMake has introduced some cleaner and more precise constructs. The course will focus on the new constructs where possible.

About the presenter

Software engineer at KDAB, Andreas Hartmetz has been contributing to KDE base libraries since 2007, when KDE switched to CMake for KDE 4.0. An expert on CMake, Andreas recently took the lead on a project successfully porting to CMake from a sophisticated GNU Make build system. He is the main author of KDAB’s CMake training material. Andreas studied Physics in Heidelberg and Berlin.


3 . Beyond code – Improved Quality through User Centric Development – Björn Balazs

Target Audience: Developer, Development Lead, Product Manager, Manager, Decision Maker interested in learning how users can be involved to boost a products’ success

Prerequisite: Being part of a product development team

Users ultimately decide about the success of your product – at the latest when they are supposed to use it. But, fear not: With this training we provide you with strategies for turning your users into allies early in the development process. These strategies will not only lead to better customer satisfaction, but also help to improve the development process itself.

Wondering how your product can benefit from the ideas behind Usability, User Centered Development, Design Thinking or Interaction Design?

With this introductory training you will not only understand the theory, but you will also take away tools and strategies you can directly introduce to your product development team back home. We will of course put a special focus on the challenges and opportunities that developing with Qt & QtQuick Technologies bring to the process.

Some Topics covered:

  • ISO 9241-210 or What is a User Centered Development Process?
  • Personas: Making Users actionable in the Development Process
  • What do users want? Getting User Feedback right.
  • Usability Testing: Guerilla vs. The Laboratory
  • Prototyping and How Qt can help.

About the presenter

Björn Balazs
Björn is a Senior Experience Engineer at KDAB in Berlin. He has specialized in Usability and User Experience since 1999 and holds a Diploma in Psychology. A longtime member of the KDE visual design group, Björn has worked for many free software projects. For the past ten years, he has regularly given trainings on user-centric development. Languages: German, English.


4. Debugging and Profiling Qt development – Milian Wolff

Target audience: Developers who want to find and fix problems

Prerequisite: Knowing the basics of C++, Qt and QML

This training gives an introduction to various tools, which help developers and testers in finding bugs and performance issues.

The tools presented cover a wide range of problems, from general purpose debugging and CPU profiling to Qt specific high-level analyzers. Often, it is relatively simple to run a tool, but interpreting the results, or even just using some of the more advanced tools, requires deep technical knowledge.
The most important tools on all major platforms that Qt supports, i.e. Linux, Windows, Mac OSX, iOS and Android, will be covered:

Debugging:

  • General purpose debuggers: GDB, LLDB, Windows debugging tools
  • Memory error detectors: valgrind’s memcheck, Dr memory, AddressSanitizer
  • OpenGL: apitrace
  • Various Qt built-in features for logging, QML
  • GammaRay to investigate internals of Qt Applications

Profiling:

  • CPU: valgrinds’s callgrind, Linux perf, Intel VTune Amplifier, Instruments, Visual Studio
  • Heap memory: valgrind’s massif, heaptrack, Instruments, Visual Studio
  • OpenGL: apitrace, NVidia nSight, AMD CodeXL, Vivante vProfile

Testing:

  • Qt TestLib: unit tests and benchmarks
  • Static code analysis
  • Code coverage

About the presenter

Milian Wolff
Software engineer at KDAB’s Berlin office, Milian has a special interest in tooling and profiling. He created the Massif-Visualizer and heaptrack, which are now used regularly to improve the performance of both C++ and Qt applications. These days, Milian applies this knowledge to improve code base performance for KDAB’s customers. He is the co-maintainer of the KDevelop IDE and in 2015 won their Akademy Award for his ongoing work there. He has a Masters Degree in Physics. Languages: English, German.


5. Introduction to QML – also known as Qt Quick
– Kevin Funk and Jesper Pedersen

Target Audience: Developers and managers interested in learning the autonomy of a QML application

Prerequisite: Knowing the basics of Qt at C++ level is an advantage but not a requirement

This training is an introduction to Qt Quick. On the one hand it will teach you how to compose fluid user interfaces with slick animations using the QML language. On the other hand it will teach you how you hook the QML side up to your business logic in C++.

About the presenters

Kevin Funk
Software engineer at KDAB, Kevin has actively developed with Qt since 2006 and has a special interest in tooling and profiling. An active contributor to KDAB’s GammaRay analyzer, state machine tooling, Kevin is responsible for the Continuous Integration System within KDAB. He’s one of the lead developers of the KDevelop IDE, and is pushing for cross-platform success inside KDE. Kevin holds a Masters Degree in Computer Science.

Jesper Pedersen
Senior Software Engineer at KDAB. Jesper has actively developed with Qt since 1998 and is the mind behind numerous KDE programs and components, as well as the main author of the course material we use for the Qt courses. He holds an MSc in Computer Science and has taught more than 70 Qt classes for companies such as Boeing, IBM, and Veritas. 


6. What’s new in C++11/C++14? – Thomas McGuire

Target Audience: C++ developers who want to upgrade their C++ skills

Prerequisite: Knowing the basics of C++ (the old standard) is a requirement, though more advanced topics will be explained as needed. Knowing the basics of Qt is beneficial, but not required.

This training is targeted at people who are interested to combine the new features of C++11/C++14 with Qt5 (and, to a lesser extent, Qt 4.8). It will teach you all about the new C++11/C++14 features, but also throws in Qt-specific information, including how to structure your code so that a simple recompile with a C++14 compiler will make your applications both faster and use less memory.

About the presenter

Thomas McGuire
Software Engineer at KDAB. Thomas has actively developed with Qt since 2006 and is now a contributor and approver in the Qt project. He joined KDAB in 2008, where his main responsibilities are working on customer projects, on-site consulting and holding trainings in Qt and C++11/14. Thomas has contributed to the KDE project, mainly to the KDE PIM applications and libraries, and was maintainer of the KMail application. He has been a speaker at conferences like KDE’s Akademy and Qt Developer Days. Thomas holds an MSc in Computer Science.


7. Introduction to Modern OpenGL with Qt
– Giuseppe D’Angelo

Target Audience: Developers interested in learning the basics of OpenGL.

Prerequisite: A basic level of linear algebra will be assumed for this course (multiplying a matrix and a vector). Mathematics will be kept to a bare minimum so as not to get in the way of eye candy!

OpenGL is a central part of QtQuick2 in Qt 5 and also plays a key role in displaying the main content of many widget-based applications.

OpenGL has been around for many years and in recent times has evolved to shed much of its legacy baggage and better expose the underlying hardware. Modern OpenGL allows us to take full advantage of the enormous power and parallel processing power of today’s GPUs. Maximizing performance of OpenGL rendering requires us to understand how GPUs work and how to efficiently feed them with data.

Qt provides a number of classes to make life easier when working with modern OpenGL. This training will show you how to do the basic tasks associated with OpenGL rendering and will go on to show how to use Qt and OpenGL to achieve a number of rendering effects and algorithms. You will also learn how to write custom QtQuick2 items using the OpenGL and scene graph APIs.

About the presenter

Giuseppe D’Angelo
Software Engineer at KDAB. Giuseppe is a long time contributor to Qt, having used Qt and C++ since 2000, and he is an Approver in the Qt Project. His contributions in Qt range from containers and regular expressions to GUI, Widgets, and OpenGL. A free software passionate and UNIX specialist, before joining KDAB, he organized conferences on opensource around Italy, especially about Perl. He holds a BSc in Computer Science.


8. Introduction to Testing Qt GUI Applications with Squish – Florian Turck

Target Audience: Testers, Developers and Managers interested in how to automate
testing of Qt applications

Prerequisite: Basic scripting skills and knowing the basics of Qt are a benefit for this training. Bring your laptop and request a free evaluation license and download in advance through http://www.froglogic.com/squish/evaluate.php

While unit testing is established to test components, integration and system tests verify that the overall system works as expected. Squish is the tool for automating these blackbox tests in the world of Qt.

The presenter will introduce you to the automated functional testing of user interfaces based on Qt. Besides getting to know the record and playback GUI testing tool Squish, additional topics range from best practices for test design over test refactoring to Behaviour Driven Testing.

This training includes theoretical modules and live demonstrations, but you are invited to join working on practical exercises – bring your laptop to participate.

About the presenter

Florian Turck – froglogic
Florian Turck is a froglogic Technical Sales Engineer and Software Trainer. An ISTQB-certified tester, he has conducted dozens of Squish trainings for various companies and provides consulting services to prospects and customers.

The post KDAB Training Day at QtCon appeared first on KDAB.

QtWS2016 – Call for Papers Extended, Website and Registration Open

Due to several requests, we’ve decided to extend the deadline for Qt World Summit 2016 Call for Papers until Friday June 3rd. So, now you have all the needed time to really polish your submission or even enough to start a completely new one!

Last year’s magnificent Qt World Summit 2015 gathered around 850 attendees all-around the Qt world in Berlin and more than 2000 people online. This is your chance to present, network and join that awesome crew! For Qt World Summit 2016, which is held October 18th-20th in San Francisco, CA, we accept high-quality talks all the way from industry-related business or technology strategy talks to hands-on technical Qt talks. *This* is your place to show your work or ideas around Qt for the relevant audience.

So, again, you have two more weeks to submit your abstract. Check out our submission themes, categories and speaker benefits from the call for speakers page.

Oh, and while we’re at it, check out the rest of the just-opened Qt World Summit web page as well–most importantly:

Registration for Qt World Summit 2016 is now open!

We are offering 2-day Conference tickets with a go-o-o-o-d discount for those who sign up early, so make sure to book your ticket soon.*

Do you wanna go?

 

*Three-Day Tickets / Training tickets are going to be available at the end of May

The post QtWS2016 – Call for Papers Extended, Website and Registration Open appeared first on Qt Blog.

Generating Python Bindings with Clang

Python Bindings

Python provides a C API to define libraries which can be imported into a python environment. That python C interface is often used to provide bindings to existing libraries written in C++ and there are multiple existing technologies for that such as PyQt, PySide, Boost.Python and pybind.

pybind seems to be a more modern implementation of what Boost.Python provides. To create a binding, C++ code is written describing how the target API is to be exposed. That gives the flexibility of defining precisely which methods get exposed to the python environment and which do not.

PyQt and PySide are also similar in that they require the maintenance of a binding specification. In the case of PySide, that is an XML file, and in the case of PyQt that is a DSL which is similar to a C++ header. The advantage both of these systems have for Qt-based code is that they ship with bindings for Qt, relieving the binding author of the requirement to create those bindings.

PyKF5 application using KItemModels and KWidgetsAddons

PyKF5 application using KItemModels and KWidgetsAddons

Generated Python Bindings

For libraries which are large library collections, such as Qt5 and KDE Frameworks 5, manual binding specification soon becomes a task which is not suitable for manual creation by humans, so it is common to have the bindings generated from the C++ headers themselves.

The way that KDE libraries and bindings were organized in the time of KDE4 led to PyQt-based bindings being generated in a semi-automated process and then checked into the SCM repository and maintained there. The C++ header parsing tools used to do that were written before standardization of C++11 and have not kept pace with compilers adding new language features, and C++ headers using them.

Automatically Generated Python Bindings

It came as a surprise to me that no bindings had been completed for the KDE Frameworks 5 libraries. An email from Shaheed Hague about a fresh approach to generating bindings using clang looked promising, but he was hitting problems with linking binding code to the correct shared libraries and generally figuring out what the end-goal looks like. Having used clang APIs before, and having some experience with CMake, I decided to see what I could do to help.

Since then I’ve been helping get the bindings generator into something of a final form for the purposes of KDE Frameworks, and any other Qt-based or even non-Qt-based libraries. The binding generator uses the clang python cindex API to parse the headers of each library and generate a set of sip files, which are then processed to create the bindings. As the core concept of the generator is simply ‘use clang to parse the headers’ it can be adapted to other binding technologies in the future (such as PySide). PyQt-based bindings are the current focus because that fills a gap between what was provided with KDE4 and what is provided by KDE Frameworks 5.

All of that is internal though and doesn’t appear in the buildsystem of any framework. As far as each buildsystem is concerned, a single CMake macro is used to enable the build of python (2 and 3) bindings for a KDE Frameworks library:


  ecm_generate_python_binding(
    TARGET KF5::ItemModels
    PYTHONNAMESPACE PyKF5
    MODULENAME KItemModels
    SIP_DEPENDS
      QtCore/QtCoremod.sip
    HEADERS
      ${KItemModels_HEADERS}
  )

Each of the headers in the library are parsed to create the bindings, meaning we can then write this code:


  #!/usr/bin/env python
  #-*- coding: utf-8 -*-

  import sys

  sys.path.append(sys.argv[1])

  from PyQt5 import QtCore
  from PyQt5 import QtWidgets

  from PyKF5 import KItemModels

  app = QtWidgets.QApplication(sys.argv)

  stringListModel = QtCore.QStringListModel(
    ["Monday", "Tuesday", "Wednesday",
    "Thursday", "Friday", "Saturday", "Sunday"]);

  selectionProxy = KItemModels.KSelectionProxyModel()
  selectionProxy.setSourceModel(stringListModel)

  w = QtWidgets.QWidget()
  l = QtWidgets.QHBoxLayout(w)

  stringsView = QtWidgets.QTreeView()
  stringsView.setModel(stringListModel)
  stringsView.setSelectionMode(
    QtWidgets.QTreeView.ExtendedSelection)
  l.addWidget(stringsView)

  selectionProxy.setSelectionModel(
    stringsView.selectionModel())

  selectionView = QtWidgets.QTreeView()
  selectionView.setModel(selectionProxy)
  l.addWidget(selectionView)

  w.show()

  app.exec_()

and it just works with python 2 and 3.

Other libraries’ headers are more complex than KItemModels, so they have an extra rules file to maintain. The rules file is central to the design of this system in that it defines what to do when visiting each declaration in a C++ header file. It contains several small databases for handling declarations of containers, typedefs, methods and parameters, each of which may require special handling. The rules file for KCoreAddons is here.

The rules file contains entries to discard some method which can’t be called from python (in the case of heavily templated code for example) or it might replace the default implementation of the binding code with something else, in order to implement memory management correctly or for better integration with python built-in types.

Testing Automatically Generated Python Bindings

Each of the KDE Frameworks I’ve so far added bindings for gets a simple test file to verify that the binding can be loaded in the python interpreter (2 and 3). The TODO application in the screenshot is in the umbrella repo.

The binding generator itself also has tests to ensure that changes to it do not break generation for any framework. Actually extracting the important information using the cindex API is quite difficult and encounters many edge cases, like QStringLiteral (actually includes a lambda) in a parameter initializer.

Help Testing Automatically Generated Python Bindings

There is a call to action for anyone who wishes to help on the kde-bindings mailing list!


Five Reasons to Integrate Customized Qt SDKs for Your Business – Webinar

Developing various applications that take advantage of all the hardware and development resources available is not a trivial task, and succeeding in creating a positive Developer Experience (DX) and User Experience (UX) to grow your business is even more difficult. Learn how building customized Qt SDKs can help you utilize the full resources of developers and target hardware and software platforms. 
 
Register for our interactive webinar to kick-start your SDK strategy with experts from Qt, Esri and PubNub.  

Learn how to: 

  • Grow your business and multiply applications in your ecosystem 
  • Enhance the DX/UX and determine the performance you require 
  • Build your brand and show the ease of integration to your partners 
  • Save costs and enjoy faster time-to-market with extensible features
  • Increase performance and boost security 
Build your user experience from the home, car, workspaces and bring your brand in front of various application creators of various industries to your ecosystem with a powerful framework that will grow your business. 
 
Panelists: 
  • Alistair Adams, Automotive Program Manager, The Qt Company
  • Michael Tims, Software Engineer, Esri
  • Jonas Gray, Head of Strategy, PubNub
 This webinar will be 30 minutes followed by a panel discussion with Qt SDK makers and Q&A.  
Ready to develop an Qt SDK and want to skip this step? Watch how on-demand: “Building Performant SDKs for Embedded Devices”

The post Five Reasons to Integrate Customized Qt SDKs for Your Business – Webinar appeared first on Qt Blog.

Did the Auto Industry’s iPhone Moment Just Happen?

I was present at the 2007 MacWorld Expo where the iPhone was announced. Ever the master marketer, Steve Jobs orchestrated a live demo, placing a call to Apple’s VP of Marketing as he was walking down the aisle of the packed auditorium. Afterward, in the large Apple booth on the exhibit floor, there were two suspended models of iPhones rotating in plexiglass cases: you couldn't touch them, you couldn't hold them, you couldn't make calls on them like Steve Jobs had done from the stage.

Left Out in the Kold: The User Experience of Keurig

One of the perks of being a technology company, is we get lots of fun toys around the office. For example, we’ve had a few Keurig coffee machines in our office kitchen for several years now.  They are quick, simple to use and produce adequate caffeinated beverages to feed our morning addictions. So when I heard that ICS had acquired a Keurig®-KOLD™ machine, I immediately headed for the kitchen to see how it compared to its warm-blooded sibling.

(Note:  We’re based in Boston; we have ‘soda’, not ‘pop’.  Just go with it.)

QtCon Call for Papers Extended!

Berlin, September 1-4

The Call for Papers is extended to May 22nd!!

What have you been working on lately that you’d like to share at a QtCon talk? The Qt Community of developers wants to hear from you! Submit your proposal by May 22nd and get a chance to contribute to this one-off, unique Event in Berlin.< />

Find out more and submit your papers here QtConInfo_v4_wee

The post QtCon Call for Papers Extended! appeared first on KDAB.

Qt @ NXP FTF 2016

The Qt Company is a Silver Sponsor with Adeneo Embedded at NXP FTF Technology Forum 2016 where inspiration, training, ecosystem and expertise you need will be provided to boldly face the challenges and opportunities from new markets and ever-changing technologies. 
 
NXP FTF Technology Forum 2016
May 16-19, 2016
JW Hotel, Austin
 
The Qt Company, Adeneo Embedded & Toradex in our technical talks during the show: 
 
Technical Talks:
 
“Performance Driven GUI Development on Low-Cost Hardware” – provided by The Qt Company on Monday, May 16 at 3:15 PM, 205 – Level 2
 
Learn how Qt for Device Creation may be used to create advanced user interfaces in a few simple steps. Qt is a cross-platform C++ framework that offers tools to create modern and fluid user experiences. The Qt framework may utilize the OpenGL ES capable i.MX6 or perform simplified rendering for the new i.MX7. We will take a look at Qt and use Qt for Device Creation to develop a GUI application optimized for projects requiring low power and real-time tasks which are suitable for wide-range of industrial applications, while keeping advanced security features to be used in IoT applications—all with confidence and convenience. Attendees will discover how easily it is to enable a low power device with performant GUI effects. This evolution requires virtually no changes to the software or hardware — made possible by the Qt Framework and standardized pin-compatible computer modules from Toradex.
“A Detailed Look on the Heterogeneous i.MX7 Architecture” – provided by Adeneo Embedded on Monday, May 16 at 3:15 PM, Griffin Hall 4 – Level 2
 
This presentation will demonstrate the capabilities of the new i.MX7 System-on-Chip, a hybrid solution containing a Cortex A7 processor and a Cortex M4 processor. Particular attention will be given to the hardware modules and software counterparts allowing both cores to communicate with each other. This hybrid architecture will be highlighted through various potential use cases/product scenarios and a Qt powered application running on top of Linux along with FreeRTOS will be showcased, focusing on asymmetric processing.
 “A Balancing Robot Leveraging the Heterogeneous Asymmetric Architecture of i.MX 7 with FreeRTOS & Qt” – provided by Toradex on Monday, May 16 at 2:00 PM, Lone Star Ballroom C – Level 3
 
This technical lecture presents how Toradex built a balancing robot demo application using the new i.MX 7’s heterogeneous asymmetric architecture. i.MX 7 features a secondary Cortex-M4, which can be used for real-time or low-power applications. We will discuss how to make use of the secondary core with a FreeRTOS based firmware implementing the closed loop controller to keep the robot balanced upright. On the powerful main CPU complex, a dual Cortex-A7, Linux is running a Qt based user interface. We will go into details about the rpmsg/OpenAMP based messaging offerings provided by NXP. The robot demo application makes use of rpmsg to communicate between the two independently running processor cores and operating systems.
 
Please Contact us if you’re in Austin during this time or have any comments. 
See you in Austin!

The post Qt @ NXP FTF 2016 appeared first on Qt Blog.

Raspberry Pi Update

It has been just over four months since my last blog post on the Raspberry Pi (1). Since then, the project has continued to move forward and I thought it was appropriate to write a new update.

The Raspberry Pi 3

raspberrypi3.jpg

Raspberry Pi 3 (image credit: Tech Radar)

How to Integrate V-Play Plugins: The Quick Guide

V-Play Plugins are the best way to improve your mobile app or game. The range includes tools for monetization, gathering analytics, and increasing user engagement and retention. V-Play Plugins have been available since V-Play 1.0 but the latest version of V-Play offers an updated approach to plugin integration.

It’s always been simple to add V-Play Plugins to apps and games. Thanks to QML, you were able to integrate plugins for multiple platforms with a single code snippet. The problem with the old integration method was linking your app or game to V-Play plugins only when needed. Until recently, V-Play Plugins were a part of standalone repositories and you could only add them on premise.

What’s New with V-Play Plugins?

The latest release of V-Play offers a new approach to V-Play Plugins integration that saves you both time and code. This has been achieved using a number of different platform-specific concepts.

plugins unselected

All V-Play Plugins are now included in the V-Play Engine Core. You can select the plugins you wish to include and then generate a license key here. You’ll be all done in two steps!

This direct integration removes the need to make extra downloads or include additional repositories in your project. It also makes it easier to toggle the functionality of plugins in your project on or off. This makes it easier to test apps and games using V-Play Plugins during development.

Benefits of the New Plugin Integration

Integration is now easier on both major mobile platforms. For adding V-Play Plugins to Android apps and games, V-Play makes use of the Gradle build system. Now you just have to add a single line of code to your build.gradle file and dependencies. This will cause changes to the AndroidManifest file to be added automatically for you.

For example, the Push Plugin can now be added to apps and games by adding a single line of code to your build file. This replaces the 7 manual steps it used to take to enable Push Notifications. If you want to disable the Push Plugin while building your app, you just need to remove the line of text from the build file. There’s no need to change the code!

The update to V-Play Plugins has added benefits, besides the ease of integration. When supported and enabled correctly, you’ll now receive more detailed console output. Just as if the native library integrations were found.

Plugin Integration for Android

Let’s take a look at how to add the Flurry Analytics Plugin to an Android app as an example.

  • Set up a Flurry user account at http://www.flurry.com/sign-up or login to your existing account. Then open your Flurry dashboard (https://dev.flurry.com/home.do) and add a new application.
  • This will create a unique application key which you’ll insert into the following code snippet, so “<flurry-api-key>” becomes, for example “RN3KB3WDNV86MDM2QM75”.
  • The following code snippet will add an event called App Started to your app. Copy and paste it into your app:

import VPlayPlugins 1.0

 Flurry {
   id: flurry

   // From Flurry Dashboard
   apiKey: ""

   Component.onComplete: {
     flurry.logEvent("App started");
   }
 }

  • You only need to add the following code to your build.gradle file to get the plugin working on Android devices:

dependencies {
compile 'net.vplay.plugins:plugin-flurry:2.+'
}

This is the line of code that you can add and remove from your project to toggle the plugin on and off. You’ve now successfully added analytics to your mobile app in 4 easy steps!

Plugin Integration for iOS

On iOS, you just need to copy the native framework into your iOS subfolder and copy/paste a few lines of code to your project file. Let’s enable the Flurry Analytics Plugin for iOS devices too.

  • Complete the first two steps from the “Plugin Integration for Android” guide: create a Flurry account and an API key
  • The next step is to download the V-Play PluginDemo from https://github.com/v-play/PluginDemo/archive/master.zip and unzip it.
  • Copy libFlurry.a from the ios subfolder of the unzipped PluginDemo folder to the sub-folder called ios within your project directory.
  • Add the following lines of code to your .pro file:

ios {
   # Flurry SDK
   LIBS += -L$$PWD/ios
   LIBS += -lFlurry
   QMAKE_LFLAGS += -Wl,-force_load,$$PWD/ios/libFlurry.a

   # Flurry dependencies
   LIBS += -framework Security
   LIBS += -framework SystemConfiguration
 }

That’s it! You’ve now added your Flurry Plugin for analytics to your cross-platform app.

You can find the integration guides for all other plugins on the Plugin page.

Easier License Integration

Previous to the latest update to V-Play Plugins, you had to add a license key for every plugin you wanted to include in your app or game. This sometimes led to issues using plugins in parallel.

Now you can select the plugins you want to add and create a new license key online. If you forget to include a plugin in your license key, the log output will notify you.

Generate Plugin Licenses Now

plugins screener

Select the V-Play Plugins fyou want to include in your app or game by ticking the boxes and then hit the “Generate License Key” button below. It’s never been easier to add plugins to your V-Play project!

These plugins are only available with the V-Play Indie & Enterprise licenses. You can try out the plugins in a demo project on GitHub. Check out the individual documentation for each plugin to find the demo projects.

The Quick Guide

For the full guide on how V-Play Plugin integration works, you can check out the documentation of the plugin you’re interested in, like the Flurry Analytics Integration guide.

For another quick example, follow these steps to integrate the Facebook plugin into your app or game for both Android and iOS devices:

  • Create a new license key
  • Add the Facebook component to your code

import VPlayPlugins 1.0

 Facebook {
   appId: "xxxxxxxxxxxxxxxx"
   readPermissions: [ "email", "user_friends" ]
   publishPermissions: ["publish_actions"]

   Component.onCompleted: {
     openSession()
   }
 }

  • Open your build.gradle file and add the following lines of code to the dependencies block:

dependencies {
   compile 'net.vplay.plugins:plugin-facebook:2.+'
 }

  • Copy the FacebookSDK.framework and Bolts.framework from the ios subfolder to a sub-folder called ios within your project directory.
  • Add the following lines of code to your .pro file:

ios {
   # Facebook framework
   LIBS += -F$$PWD/ios
   LIBS += -framework FacebookSDK
   QMAKE_LFLAGS += -Wl,-force_load,$$PWD/ios/FacebookSDK.framework/FacebookSDK

   # Facebook dependencies
   LIBS += -framework Security
   LIBS += -framework SystemConfiguration
 }

  • That’s it!

If you’ve already used V-Play Plugins in your app or game or with older versions than V-Play 2.8.3, you can check out our migration guide.

Get the Most from V-Play Plugins

The complete range of V-Play Plugins is available to all V-Play Indie & Enterprise users.

It includes tools for analytics, such as Google Analytics, Flurry, Infinario, and HockeyApp. You can also use V-Play Plugins to monetize games and apps using Chartboost, AdMob and Soomla In-App Purchases. It also includes social and user engagement plugins like Facebook, One Signal and Parse Push notifications.

Testing the Plugins

You can test all the new plugins in a simple app live on Google Play. The app will also be live on the App Store soon so you can see the plugins in action.

Google_Play_Badge-1

itunes download button

For the full source code of this sample app, including all V-Play Plugins, you can check out this GitHub sample.

1 Plugins  4 Chartboost_Interstitial  5 Soomla

Get Source Code for Plugin Integration Sample with All Plugins

Easier Plugin Integration and Migration

The new V-Play Plugins update makes it easier than ever to integrate these features into your app or game. Make sure you’re getting the most from your apps and games by integrating V-Play Plugins.

Don’t forget to Like and Retweet this article and share it with your friends and colleagues!

More Posts like This

How to Make a Game like Super Mario Maker with Our New Platformer Level Editor

Platformer Level Editor

16 Great Sites Featuring Free Game Graphics for Developers

game graphics

The 13 Best Qt, QML & V-Play Tutorials and Resources for Beginners

tutorials capture

21 Tips That Will Improve Your User Acquisition Strategy

User Acquisition

 

The post How to Integrate V-Play Plugins: The Quick Guide appeared first on V-Play Engine.

Qt Creator 4.0.0 released

We are happy to announce the release of Qt Creator 4.0.0. Starting with this release, we are making the Clang static analyzer integration, extended QML profiler features and auto test integration (experimental) available under open source. The previously commercial-only connection editor and path editor of Qt Quick Designer were already open sourced with Qt Creator 3.6.0. Qt Creator is now available under commercial license and GPLv3 (with exceptions). The exceptions ensure that there are no license restrictions on generated code, and that bridging to 3rd party code is still possible. You can read more about this change in the blog post announcing it.

New Theme and QML Flame Graph

New Flat Theme and QML Flame Graph

Users of CMake will find that we improved the workflow for CMake-based projects. CMake is now triggered automatically when necessary, and kit settings like the used Qt version or tool chain are automatically configured. Projects mode now features a UI to change the CMake configuration for a build directory. You can also change the CMake configuration that is common to all projects that use the same kit. Qt Creator will no longer create CMake build directories before the project is built. This makes for a much tidier work environment, especially when users only want to study source code using the CMake build system.

The Clang code model is now automatically used if the (experimental) plugin is turned on. We added customizable configurations for warnings, which you can also specify per project.

On the debugging side we fixed multiple issues that appeared with the new LLDB included in Xcode 7.3 on OS X. You’ll also find more pretty printers for standard types, as well as many bug fixes.

If you wonder where Analyze mode has gone: It was merged with Debug mode. In the new, unified Debug mode you now find the Debugger, Clang Static Analyzer, Memcheck, Callgrind and QML Profiler tools. The QML Profiler adds a new visualization of statistics: The Flamegraph. In this view, the horizontal bars show the amount of time all invocations of a function took, and vertical nesting on top shows which functions were called by which other ones, making for a very concise overview.

In Qt Quick Designer you can now move the canvas by dragging with the left mouse button while the space key is pressed. It adds support for the new Qt Quick Controls 2 and received many bug fixes. Please also head over to the post and video about Qt Quick Designer and Qt Quick Controls 2 that we recently published on our blog.

Qt Creator now also has a new, flat theme, which is based on the concept that Diana presented a year ago. It is default for everyone who hasn’t ever changed the theme in Qt Creator. The old theme is also still available as “Classic” in Tools > Options > Environment > Interface.

You find a more detailed list of improvements in our change log.

The opensource version is available on the Qt download page, and you find commercially licensed packages on the Qt Account Portal. Please post issues in our bug tracker. You can also find us on IRC on #qt-creator on chat.freenode.net, and on the Qt Creator mailing list.

The post Qt Creator 4.0.0 released appeared first on Qt Blog.

New Company: Edge Security

I've just launched a website for my new information security consulting company, Edge Security. We're expert hackers, with a fairly diverse skill set and a lot of experience. I mention this here because in a few months we plan to release an open-source kernel module for Linux called WireGuard. No details yet, but keep your eyes open in this space.

Qt Installer Framework 2.0.3 released

We are happy to announce that the Qt Installer Framework 2.0.3 is released.

2.0.3 is a bug fix release, mainly fixing compiling issues. The Installer Framework requires Qt5.5 or later versions to compile. Please see ChangeLog for further details.
Sources and precompiled binaries for the Installer Framework are available at download.qt.io (open source) or in your Qt Account.

The post Qt Installer Framework 2.0.3 released appeared first on Qt Blog.

Qt for Start-Ups – Get it Cheap While You Still Can!

With Qt 5.6 we introduced the possibility for start-ups and small companies to acquire full commercial licenses for Qt for Application Development with a reduced price. As an initial launch offer the start-up license tier is available as low as $49/month for an annual subscription, with the regular price being $79/month for annual billing or $99/month for more flexible, month-to-month billing.

The limited-time offer is now nearing its end and this is your last chance of purchasing the start-up license with this campaign price before the campaign will end next Thursday 19.5.

So, *now* is the time to get your fully commercially-licensed Qt for Application Development for Start-ups using the promo code StartUpIntro through our web shop.

Read more about the start-up licensing option and start creating your cross-platform desktop and mobile apps with Qt today!

Qt_Start-Up_Plan_SoMe1

The post Qt for Start-Ups – Get it Cheap While You Still Can! appeared first on Qt Blog.

C++, Qt and Treefrog to build user facing web applications

In the past I have written about my usage of Tufao and Qt to build REST services. This time I am writing about my experience of using the TreeFrog framework to build a full web application.

You might wonder why one would want to build such a thing in a statically and compiled language instead of something more dynamic. There are a few reasons for it:

  • Performance: The application is intended to run on our sysmoBTS GSM Basestation (TI Davinci DM644x). By modern standards it is a very low-end SoC (ARMv5te instruction set, single core, etc, low amount of RAM) and at the same time still perfectly fine to run a GSM network.
  • Interface: For GSM we have various libraries with a C programming interface and they are easy to consume from C++.
  • Compilation/Distribution: By (cross-)building the application there is  a "single" executable and we don't have the dependency mess of Ruby.
The second decision was to not use Tufao and search for a framework that has user management and a template/rendering/canvas engine built-in. At the Chaos Computer Camp in 2007 I remember to have heard a conversation of "Qt" for the Web (Wt, C++ Web Toolkit) and this was the first framework I looked at. It seems like a fine project/product but interfacing with Qt seemed like an after thought. I continued to look and ended up finding and trying the TreeFrog framework.

I am really surprised how long this project exists without having heard about it. It is using/built on top of Qt, uses QtSQL for the ORM mapping, QMetaObject for dispatching to controllers and the template engine and resembles Ruby on Rails a lot. It has two template engines, routing of URLs to controllers/slots, one can embed any C++ in the template. The documentation is complete and by using the search on the website I found everything I was searching for my "advanced" topics. Because of my own stupidity I ended up single stepping through the code and a Qt coder should feel right at home.

My favorite features:
  • tspawn model TableName will autogenerate (and update) a C++ model based on the table in the database. The updating is working as well.
  • The application builds a libmodel.so, libhelper.so (I removed that) and libcontroller.so. When using the -r option of the application the application will respawn itself. At first I thought I would not like it but it improves round trip times.
  • C++ in the template. The ERB template is parsed and a C++ class will be generated and the ::toString() method will generate the HTML code. So in case something is going wrong, it is very easy to inspect.

If you are currently using Ruby on Rails, Django but would like to do it with C++, have a look at TreeFrog. I really like it so far.

Release 2.8.3: New V-Play Game Center Plugin and Bug Fixes

V-Play 2.8.3 is now available for download and as a free update to all V-Play users. This update introduces the new V-Play Game Center Plugin and a number of minor bug fixes. The V-Play Game Center Plugin is included in the V-Play Indie License and is the perfect extension to the V-Play GameNetwork.

Update Now!

If you’re not an existing V-Play user, you can download the SDK for free.

V-Play GameCenter Plugin

The V-Play Game Center Plugin creates a social gaming network for your V-Play games. The Apple Game Center is a widely used gaming service that comes pre-installed on all iPhones and iPads. With this new plugin, you can take advantage of the highscores, leaderboards and achievements supplied by the Apple Game Center.

Even more, you can connect the Apple Game Center with the V-Play Game Network to get synchronized leaderboards and achievements across multiple platforms. This means your players can use their familiar iOS game service and compare their progress with players on other platforms like Android or PC.

This multi-platform support is available with just a single API call from the V-Play Game Network: a call of reportScore() or incrementAchievement() automatically posts to both gaming services. This allows your cross-platform game to grow a community open to both Android and iOS users alike.

These features make it a valuable tool for increasing player engagement in your game. You can find out how to integrate the V-Play Game Center Plugin into V-Play Game Network here.

Bug Fixes

V-Play 2.8.3 features fixes for a number of minor bugs. These changes affect both app and game development.

  • It’s no longer required to change the AndroidManifest.xml file for existing projects if you don’t use plugins in your project, as it was with update 2.8.2.
  • Fixes a possible error output that module “QtQuick.Dialogs” could not be loaded if using V-Play Game Network components.
  • A memory leak in the Chartboost Plugin has been fixed

How to Update

Test out these new features by following these steps
Step 1

Open the V-Play SDK Maintenance Tool in your V-Play SDK directory. Choose “Update components” and finish the update process to get V-Play 2.8.3 as described in the V-Play Update Guide

If you haven’t installed V-Play yet, you can do so now with the latest installer from here.

Step 2

The V-Play Sample Launcher allows you to quickly test and run all the open-source examples and demo apps & games that come with the V-Play SDK, from a single desktop application.

After installing V-Play, you can start the V-Play Sample Launcher from the application shortcut in your V-Play SDK directory.

V-Play Sample Launcher

Now you can explore all of the new features included in V-Play 2.8.3!

More Posts like This

How to Make a Game like Super Mario Maker with Our New Platformer Level Editor

Platformer Level Editor

16 Great Sites Featuring Free Game Graphics for Developers

game graphics

The 13 Best Qt, QML & V-Play Tutorials and Resources for Beginners

tutorials capture

21 Tips That Will Improve Your User Acquisition Strategy

User Acquisition

 

The post Release 2.8.3: New V-Play Game Center Plugin and Bug Fixes appeared first on V-Play Engine.

Eight Golden Rules: Rule 8 - Reduce Short Term Memory Load

A regrettable consequence of getting older is that both our senses and our memory tend to be less acute.  While I scoffed at this notion when I heard about it in HCI class back in my 20s, it is now a fact of my daily life.  The National Institute of Health (NIH) describes how changes in our brains as we get older may cause us to take longer to learn new concepts or remember information.

Media Manager for Automotive Infotainment (Part 4)

Media Manager Architecture - From Indexing Media to Playing

In the first two parts of our blog series, we examined some of the functional requirements of our Media Manager. We also showed a solution for indexing of media. In today’s installment, we explain the core architecture of the media manager and how indexed media information can be presented to our end users.

To summarize, we want the Media Manager to have a few important capabilities:

foss-north – Schedule available

Just a short update on foss-north – the schedule is up. We have a whole list of speakers that I’m super excited about and tickets are selling well. I still don’t know what to expect, but more than 1/3 of the tickets are gone and the sales numbers are actually even better for the full priced tickets than the early birds.

Speakers will cover everything from design, methodology, licensing, embedded tech, networking, IoT, start-ups, innovation – a broad spectrum demonstrating the versatility of free and open source.

To sum things up – it looks like we might actually pull this off and I still can treat my family with a vacation instead of paying for unused catering ;-)

Release 2.8.2: Easier Plugin Integration & Debug Menu Improvements

V-Play 2.8.2 is now available to all V-Play users for free. This update offers a range of improvements to the SDK to make plugin integration and testing simpler for developers. It also features a number of minor fixes for V-Play Apps components. You can update now to check out the improvements for yourself.

Update Now!

If you’re not an existing V-Play user, you can download the SDK for free.

V-Play Plugins

The release of V-Play 2.8.2 means a drastic improvement in the way 3rd party plugins are added to mobile apps and games.

Using V-Play Plugins before 2.8.2 required you to install the plugin libraries from an additional repository in the Maintenance Tool. Beginning with V-Play 2.8.2, plugins are part of V-Play Engine libraries. This reduces the necessary amount of code and time it takes to integrate plugins.

Plugins

With V-Play Plugins, you can monetize your app or game. Admob, Chartboost and Soomla allow you to advertise and enable in-app purchases.

Google Analytics is an industry-standard plugin for measuring user events. Flurry, Infinario and HockeyApp also allow you to gather data on user interactions.

The Facebook plugin and the V-Play Game Network allow you to increase retention by engaging users. All of the V-Play Plugins are available with the V-Play Indie License.

If you’re already using V-Play Plugins, you can check out our migration guide for using the new integration method. This migration guide is only for pre-existing V-Play Plugins users.

Debug Menu Improvements

V-Play recently added a Debug Menu that enables quick UI and UX testing. V-Play 2.8.2 has improved this feature for both apps and games. The Debug Menu now reduces the application window for resolutions that don’t fit on screen.

In addition, the UI is now scaled to simulate the selected device.

update-271-menu-resolution-changer

The Debug Menu allows for better testing of games and apps during development builds: you can easily switch between different platforms and screen resolutions while testing on desktop machines.

You can choose between Desktop, iOS and Android themes and see the differences instantaneously, even when the app is running, without needing to re-run the app or have a real device for testing.

Fixes

V-Play 2.8.2 includes two fixes:

  • A Sample Launcher issue with Theme initialization when running app demos.
  • A bug on Android 4 devices that caused the home button to stop working.

How to Update

Test out these new features by following these steps
Step 1

Open the V-Play SDK Maintenance Tool in your V-Play SDK directory. Choose “Update components” and finish the update process to get V-Play 2.8.2 as described in the V-Play Update Guide

If you haven’t installed V-Play yet, you can do so now with the latest installer from here.

Step 2

The V-Play Sample Launcher allows you to quickly test and run all the open-source examples and demo apps & games that come with the V-Play SDK, from a single desktop application.

After installing V-Play, you can start the V-Play Sample Launcher from the application shortcut in your V-Play SDK directory.

V-Play Sample Launcher

Now you can explore all of the new features included in V-Play 2.8.2!

More Posts like This

How to Make a Game like Super Mario Maker with Our New Platformer Level Editor

Platformer Level Editor

16 Great Sites Featuring Free Game Graphics for Developers

game graphics

The 13 Best Qt, QML & V-Play Tutorials and Resources for Beginners

tutorials capture

21 Tips That Will Improve Your User Acquisition Strategy

User Acquisition

 

The post Release 2.8.2: Easier Plugin Integration & Debug Menu Improvements appeared first on V-Play Engine.