Skip to content

KDAB’s 20 Years Developer Challenge – NOW CLOSED Participants were invited to solve the tasks to win a cool gadget

Participants were invited to solve the tasks to win a cool gadget

KDAB turned twenty at the end of 2019!

We wanted to celebrate that in a special way with our customers, partners and all developers giving you the chance to win some cool stuff!

As KDAB is especially known for its expertise in cross-platform development with Qt, C++ and 3D technologies like OpenGL, we thought of a different kind of challenge. 

Instead of asking you annoying questions like the year of KDAB’s founding or what KD stands for, we wanted to challenge your developer skills. 🙂

In order to win one of the attractive prizes – with KDAB’s know-how inside – participants were invited to solve some tricky tasks and submit the correct solutions. The challenge closed on 31st of December 2019. The winners were drawn from all the correct submissions.

And the winners are:

  1. Prize: a 20l Braumeister kit, Daniel S., Terlan, Italy
  2. Prize: a reMarkable Tablet, Slobodan K., Skopje, North Macedonia
  3. Prize: a reMarkable Tablet, David E., Kempston, England

The answers can be viewed here.


Below were the tasks for our challenge. In order to win one of the prizes, participants were asked to submit correct answers by 31st of December 2019.

(You can also download the code for these tasks.)

1. Find all bugs in the following code (why does the assert fail):

#include <QString>
#include <QDebug>

int main(int argc, char *argv[])

    QString hello = "Hello, world!";

    for (int i = 0; i < hello.length(); ++i) {
        auto current = hello[i];

        // Changing a local variable
        current = current.toUpper();

        // Printing it out
        qDebug() << "Current: " << current;

    // The original string is unchanged
    Q_ASSERT(hello == "Hello, world");

View the solution

2. Fix the undefined behavior (a crash) in the following code without slowing it down:

    #include <QString>
    #include <QDebug>
    #include <QTranslator>
    #include <QObject>
    int main(int argc, char *argv[])
        const QString youre = "You are";
        auto message = youre + " " + QObject::tr("number six");
        qDebug() << "Message is: " << message;

View the solution

3. Rewrite the following function to use algorithms from the standard library instead of for/while/do-while loops. Make sure the implementation is as efficient as possible:

#include <QtGlobal>
#include <vector>

int counting(const std::vector& xs, const std::vector& ys)
    int result = 0;

    for (auto x: xs) {
        bool flag = true;
        for (auto y: ys) {
            if (y < x) flag = false;
        if (flag) result++;

    return result;

int main(int argc, char *argv[])

    Q_ASSERT(counting(std::vector{1, 2, 3}, std::vector{2, 3, 4}) == 2);

View the solution  

Prize details

First Prize

1 x Braumeister Plus 20l kit (new model coming out in spring 2020*)

The Braumeister was specially developed as a brewing system for the aspiring and active hobby and home brewer. The next product generation is coming out 2020.

KDAB helped Braumeister slim down the operating system to just the necessary features, configure start-up of software components and connect them to each other. Through using Qt and QML we were able to realize our customers’ design and interaction ideas. This, along with added touch features, makes the Braumeister system an intuitive and visually rich brewing experience for all users.

You could be one of those first users!

For detailed information about the product check out this link...

By the way, you can also use a Braumeister kit to brew alcohol free beer. And if you win the first prize, but don't like beer brewing, we will look for a way to exchange your prize with another winner.

Second and Third Prizes

2 x reMarkable The Paper Tablets including Folios

reMarkable is a digital device that gives you a pen-to-paper note-taking experience. It converts your handwritten notes to typed text, making them easy to refine and share. KDAB helped reMarkable with our expertise in C++, QML and performance optimization. For more information about the device check

Terms of participation

By submitting your solutions for the "KDAB 20 years developer challenge", here referred to as "challenge", you agree to the following:

  1. Participants in the challenge have to be over 21 years old.
  2. All participants who submit correct solutions via the form on by 31st of December 2019 will take part in a raffle.
  3. The winners will be drawn from all the correct submissions after 31st of December 2019 and informed by 15th January 2020 via email.
  4. The correct solutions for the tasks will be published on after the end of the challenge.
  5. *The prizes will be shipped to the winners’ addresses soon after the announcement of the winners. Please note: The new model of the Braumeister 20l kit will be released in spring 2020. The winner will be informed about the presumed shipping date as soon as there is a release date. The prize can't be delivered before that date.
  6. Employees of KDAB Group and the companies connected with it and their dependents as well as employees of Qt Company are excluded from the challenge.
  7. No cash disbursement and/or replacement of prizes is possible
  8. Recourse to the courts is not permitted.