Trusted Software Excellence across Desktop and Embedded
Take a glance at the areas of expertise where KDAB excels ranging from swift troubleshooting, ongoing consulting and training to multi-year, large-scale software development projects.
Find out why customers from innovative industries rely on our extensive expertise, including Medical, Biotech, Science, Renewable Energy, Transportation, Mobility, Aviation, Automation, Electronics, Agriculture and Defense.
High-quality Embedded Engineering across the Stack
To successfully develop an embedded device that meets your expectations regarding quality, budget and time to market, all parts of the project need to fit perfectly together.
Learn more about KDAB's expertise in embedded software development.
Where the capabilities of modern mobile devices or web browsers fall short, KDAB engineers help you expertly architect and build high-functioning desktop and workstation applications.
Extensible, Safety-compliant Software for the Medical Sector
Create intelligent, patient-focused medical software and devices and stay ahead with technology that adapts to your needs.
KDAB offers you expertise in developing a broad spectrum of clinical and home-healthcare devices, including but not limited to, internal imaging systems, robotic surgery devices, ventilators and non-invasive monitoring systems.
Building digital dashboards and cockpits with fluid animations and gesture-controlled touchscreens is a big challenge.
In over two decades of developing intricate UI solutions for cars, trucks, tractors, scooters, ships, airplanes and more, the KDAB team has gained market leading expertise in this realm.
Build on Advanced Expertise when creating Modern UIs
KDAB assists you in the creation of user-friendly interfaces designed specifically for industrial process control, manufacturing, and fabrication.
Our specialties encompass the custom design and development of HMIs, enabling product accessibility from embedded systems, remote desktops, and mobile devices on the move.
Legacy software is a growing but often ignored problem across all industries. KDAB helps you elevate your aging code base to meet the dynamic needs of the future.
Whether you want to migrate from an old to a modern GUI toolkit, update to a more recent version, or modernize your code base, you can rely on over 25 years of modernization experience.
KDAB offers a wide range of services to address your software needs including consulting, development, workshops and training tailored to your requirements.
Our expertise spans cross-platform desktop, embedded and 3D application development, using the proven technologies for the job.
When working with KDAB, the first-ever Qt consultancy, you benefit from a deep understanding of Qt internals, that allows us to provide effective solutions, irrespective of the depth or scale of your Qt project.
Qt Services include developing applications, building runtimes, mixing native and web technologies, solving performance issues, and porting problems.
KDAB helps create commercial, scientific or industrial desktop applications from scratch, or update its code or framework to benefit from modern features.
Discover clean, efficient solutions that precisely meet your requirements.
Boost your team's programming skills with in-depth, constantly updated, hands-on training courses delivered by active software engineers who love to teach and share their knowledge.
Our courses cover Modern C++, Qt/QML, Rust, 3D programming, Debugging, Profiling and more.
The collective expertise of KDAB's engineering team is at your disposal to help you choose the software stack for your project or master domain-specific challenges.
Our particular focus is on software technologies you use for cross-platform applications or for embedded devices.
Since 1999, KDAB has been the largest independent Qt consultancy worldwide and today is a Qt Platinum partner. Our experts can help you with any aspect of software development with Qt and QML.
KDAB specializes in Modern C++ development, with a focus on desktop applications, GUI, embedded software, and operating systems.
Our experts are industry-recognized contributors and trainers, leveraging C++'s power and relevance across these domains to deliver high-quality software solutions.
KDAB can guide you incorporating Rust into your project, from as overlapping element to your existing C++ codebase to a complete replacement of your legacy code.
Unique Expertise for Desktop and Embedded Platforms
Whether you are using Linux, Windows, MacOS, Android, iOS or real-time OS, KDAB helps you create performance optimized applications on your preferred platform.
If you are planning to create projects with Slint, a lightweight alternative to standard GUI frameworks especially on low-end hardware, you can rely on the expertise of KDAB being one of the earliest adopters and official service partner of Slint.
KDAB has deep expertise in embedded systems, which coupled with Flutter proficiency, allows us to provide comprehensive support throughout the software development lifecycle.
Our engineers are constantly contributing to the Flutter ecosystem, for example by developing flutter-pi, one of the most used embedders.
KDAB invests significant time in exploring new software technologies to maintain its position as software authority. Benefit from this research and incorporate it eventually into your own project.
Start here to browse infos on the KDAB website(s) and take advantage of useful developer resources like blogs, publications and videos about Qt, C++, Rust, 3D technologies like OpenGL and Vulkan, the KDAB developer tools and more.
The KDAB Youtube channel has become a go-to source for developers looking for high-quality tutorial and information material around software development with Qt/QML, C++, Rust and other technologies.
Click to navigate the all KDAB videos directly on this website.
In over 25 years KDAB has served hundreds of customers from various industries, many of them having become long-term customers who value our unique expertise and dedication.
Learn more about KDAB as a company, understand why we are considered a trusted partner by many and explore project examples in which we have proven to be the right supplier.
The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications.
Read more about the history, the values, the team and the founder of the company.
When working with KDAB you can expect quality software and the desired business outcomes thanks to decades of experience gathered in hundreds of projects of different sizes in various industries.
Have a look at selected examples where KDAB has helped customers to succeed with their projects.
KDAB is committed to developing high-quality and high-performance software, and helping other developers deliver to the same high standards.
We create software with pride to improve your engineering and your business, making your products more resilient and maintainable with better performance.
KDAB has been the first certified Qt consulting and software development company in the world, and continues to deliver quality processes that meet or exceed the highest expectations.
In KDAB we value practical software development experience and skills higher than academic degrees. We strive to ensure equal treatment of all our employees regardless of age, ethnicity, gender, sexual orientation, nationality.
Interested? Read more about working at KDAB and how to apply for a job in software engineering or business administration.
Following on from the previous articles on SlideViewer, we shall now investigate another piece of the puzzle towards making SlideViewer usable in practise. Namely, getting the content rendered from our domain specific language and on to the screen or projector for the audience to marvel at.
Those of you that have ever presented at conferences, business meetings or the like will know what a joy it is to configure $LAPTOP_BRAND running $OPERATING_SYSTEM in conjunction with $PROJECTOR or $MONITOR. As a group, the KDAB trainers have a range of options that we can use to hopefully make this easier but largely they boil down to two varieties:
Mirror part or all of the display that the presenter can see or
Put the display content onto a separate window
The first option is most easily achieved via system level tools specific to each platform. If it is only possible to mirror the entire display that gives the instructor more stress as then he/she can only see the same content as the audience. No presenter notes, tips, upcoming slides, timing information etc.
The second option is my preferred approach as it means I can have access to all those extra goodies to make my life as a presenter a little easier without distracting the audience. With this in mind, let's see one possible solution to creating this configuration.
SlideViewer's Main and Display Windows
SlideViewer is a typical hybrid C++/QML application. Where we start to break the usual pattern is when we come to want to display a subset of our UX, i.e. the slide content, in a separate window as described above. SlideViewer's main window typically looks something like this:
Let's examine our requirements:
Display the content of the current slide in a separate window without other distracting information.
Don't create unnecessary copies of items to keep memory usage under control.
Do not add a large performance overhead - animations should still be smooth.
Show anything that QtQuick is capable of rendering.
No need to handle events or input on display window, presenter will drive this from the main window.
We can start tackling the problem quite easily. From the requirements, we need a window on which to render our content. With Qt 5 this is trivial as all we need is a subclass of QWindow. At this stage our options are to use QQuickView which pulls in all of the QML machinery or to do something more simple ourselves. We don't really want to have a second tree of QML items in our display window that mirrors the scene shown in our main window. This would lead to headaches keeping the two trees in sync with each other and use up more memory than is necessary. So let's see about using QWindow and taking care of the rendering ourselves.
Creating a subclass of QWindow that will do as we require is fairly simple and we will fill in the details of this as we progress. To make our DisplayWindow class available to QML we register it with Qt in our main function with:
Note that the title and visible properties are inherited from QWindow. The _settings object is a C++ object that has been exported to the QML runtime via the usual setContextProperty() approach and which contains a bunch of properties for various application settings.
Rendering to the Display Window
Recall that QtQuick 2 makes use of a 2D scenegraph to control its rendering. The scenegraph is great and takes care of all the headaches involved with taming the underlying OpenGL objects and draw calls. The fact that the QtQuick 2 scenegraph uses OpenGL is good as it means we can make use of this to help us render into our dispay window.
Wouldn't it be great if we could get the scenegraph to render a sub-tree of our main window's QML scene into an OpenGL texture that we could then re-use? Well, good news everybody! It turns out we can (otherwise I wouldn't have mentioned it). Even better, there is already a Qt Quick 2 item that will do this for us and it is called ShaderEffectSource.
ShaderEffectSource is usually used in conjunction with it's partner in crime, ShaderEffect to apply some fancy post-processing effects or mesh distortions to a piece of your QML scene. It works by rendering the QML sub-tree rooted at a specified sourceItem into an OpenGL framebuffer object (FBO) with a texture attached to the FBO's first color attachment point. The resulting texture is then used by ShaderEffect in conjunction with some GLSL shader code to transform it in some way. There are lots of examples that ship with Qt demonstrating this.
In our case we don't need the post-processing capabilities of ShaderEffect, all we need is to be able to get our hands on the texture rendered to by the scene graph for our sub-tree. The idea is that to render the contents of the DisplayWindow all we do is render a quad (having the same aspect ratio as the source item) that is textured using lookups from the texture containing our rendered QML sub-tree.
Why do I keep talking about sub-trees? Well, we only want to render the current slide in our display window and not the entire main window which is also part of our overall QML scene.
Let's take another step closer to the solution and make the sub-tree for our current slide get rendered into a texture and somehow expose that texture to our DisplayWindow object. In QML we redirect the current slide into a texture and make the ShaderEffect available very easily with:
where content is the id of our current slide placeholder (we use a Loader item within content to load data when needed). We have added a source property to our DisplayWindow class in the usual way:
All we do in the setSource() function is to store a pointer to the ShaderEffectSource item passed in from QML. The cunning part happens when we hook into the Qt Quick 2's scenegraph rendering.
The rendering in Qt Quick 2 may or may not happen in a separate thread from your application's main thread. This is determined mainly by the capabilities of your platform but it can be overridden by an environment variable if your platform is capable. With this in mind we can hook into the scenegraph's usual rendering sequence and do some work of our own in there. We do this by connecting to a signal emitted by the scenegraph, QQuickWindow::afterRendering() that gets emitted once the scenegraph has done its work. At this stage we know that the texture used by the ShaderEffectSource will be populated with our sub-tree's rendered output so we can borrow it to our own ends. We do this by making sure our rendering function gets called at this point by:
The use of Qt::DirectConnection takes care of making sure that our DisplayWindow::update() function is called in the correct thread context, i.e. that of the Qt Quick 2 scenegraph.
Within DisplayWindow::update() we have a few tasks to do:
Make sure we have an OpenGL context with which we can draw
Prepare any resources needed for rendering: shader programs, buffer objects of vertex data and of course...
The texture that contains our rendered sub-tree, the current slide.
Initially when we coded up this feature in SlideViewer we tried making use of the scene graph's OpenGL context as that is guaranteed to be current when our rendering function is called in response to the afterRendering signal. This worked fine on Linux but it seems the OS X Cocoa QPA plugin did not like us using this context to render to a different window surface. In theory this should not be a problem so I suspect there's a subtle bug in the Cocoa QPA plugin. To work around this issue we actually create a second OpenGL context that is able to share resources (including textures) with that of the scene graph's context:
The preparation of OpenGL resources is performed only when required and consists of the usual business of compiling a trivial OpenGL shader program with QOpenGLShaderProgram and storing the vertex positions and texture coordinates of a single quad (two triangles) in a QOpenGLBuffer object.
The only non-obvious part is how to get hold of the texture containing the QML scene. Luckily, this is also straightforward but it does require the use of some private and undocumented APIs:
And finally, to make sure that we actually get to see what we've just rendered we have to be sure to swap the front/back buffers (we're using double buffering) and we release our context to clean up after ourselves:
So there you have it. We have made a simple sub-class of QWindow that is able to very efficiently render any sub-tree of a QML scene by making use of our knowledge of OpenGL which is used behind the scenes by Qt Quick 2's scenegraph. In addition we have a nice simple way of exposing the DisplayWindow to QML so that we can easily control it from QML just like any other built-in element.
We are using the QQuickWindow::afterRendering() signal to drive our rendering and since all we are doing is drawing a single large textured quad we have very minimal impact on performance and memoryusage. Any animations included in the QML scene will work frame-perfect in the display window just as they do in the mainwindow.
Of course there's a little more to it in the actual code as we have to care for window resizing, moving the display window to different desktops or outputs etc. but this is the basic approach.
This of course only scratches the surface of what we could do. Now that we have the QML sub-tree available as a texture we could use this with any number of post-processing or special effects in the display window. Some ideas are fancy transitions, animated 3D backgrounds etc. You could even potentially take this further and use a second QML scene in the display window that contains a custom item which uses our texture from the main window's scene. Perhaps something for the future.
About KDAB
Trusted software excellence across embedded and desktop platforms
The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications. In addition to being leading experts in Qt, C++ and 3D technologies for over two decades, KDAB provides deep expertise across the stack, including Linux, Rust and modern UI frameworks. With 100+ employees from 20 countries and offices in Sweden, Germany, USA, France and UK, we serve clients around the world.
Dr Sean Harmer is a senior software engineer at KDAB where he heads up our UK office and also leads the 3D R&D team. He has been developing with C++ and Qt since 1998 and is Qt 3D Maintainer and lead developer in the Qt Project. Sean has broad experience and a keen interest in scientific visualization and animation in OpenGL and Qt. He holds a PhD in Astrophysics along with a Masters in Mathematics and Astrophysics.