Qt Quick Layouts are highly effective for automatically positioning and resizing elements. Acting as positioners, layouts organize their children based on criteria such as vertical, horizontal, or grid arrangements. Unlike positioners, they can also resize elements and provide a more comprehensive API for managing size control.
Today's blog post is about something that should be simple and apparently it causes trouble: how to declare a qHash overload for a custom datatype. This is necessary when we want to use custom datatypes as keys in a QHash. From the documentation: A QHash's key type has additional requirements other than being an assignable […]
This video is about the "clip" property. You can set it on any item in order to make it clip its children to its geometry. What has it to do with views? It's quite simple: ListView is generally an element where you always want clipping to be enabled, otherwise the entries in your list will "leak" outside of its borders.
Entries in a ListView can be grouped in sections. In this video we will present a little trick to make the section collapse when clicked. Consider it a little exercise -- it requires a bit of creativity and knowledge about how QML works.
ListView can be customized in many ways! There are plenty of knobs and levers to control ListView's behavior. We can highlight the current index, we can have keyboard navigation, we can control its scrolling and even have section headings. In this video we'll explore a few of these customization options.
This video introduces two important building blocks: positioners elements and the Repeater element. Positioners are used to automatically place their children side by side or one below each other, and so on. The Repeater element creates a number of elements driven by a data model. By placing a Repeater into a positioner, we can create elements driven by data and arrange them, all automatically.
ListView is probably the most important component for model/view programming in QML. ListView supports flicking, it creates and destroys elements on demand (to be able to work with very big datasets), and so on. This video introduces ListView and its basic usage.
After four months of intensive development work, I am happy to announce that the first QStringTokenizer commits have landed in what will eventually become Qt 6.0. The docs should show up, soon. While the version in Qt will be Qt 6-only, KDAB will release this tool for Qt 5 as part of its KDToolBox productivity […]
Today, KDAB is releasing version 1.2 of the 3D integration workflow Kuesa 3D, built on top of Qt 3D. Kuesa™ 3D is a complete design-to-code workflow solution for 3D in real-time applications, centered around the open glTF™ 2 format, supported by Blender, Maya and 3ds Max. In short, Kuesa provides a workflow that simplifies work […]
This May KDAB News edition covers: follow-up on using FOSS software with commercial Qt licenses; Qt 5.15 release; Qt Multimedia add-on; KUESA 3D Studio 1.2 release; Flutter 1.17 release.
In the last blog post we saw an essential, C++ oriented, Visual Studio Code setup. That was enough to get going right away, but we can still definitely do more and better. Here I'll show you how to get a complete setup for your qmake and CMake projects, all this while also wearing a Qt […]
KDAB's Kevin Funk presented Using Modern CMake with Qt at Qt Virtual Tech Con last month. He reported that the Qt Company did a great job moderating the sessions at this event, and there was a lively Q&A at the end - Kevin had to pick from about 60 questions, so this is a hot […]
My first project when I entered KDAB was the migration of a multi-million lines Motif application to Qt... feels quite scary said like that. Fortunately, migrations from any toolkit to Qt is something KDAB has been doing from the beginning, and has lots of experience with. You may be wondering what this has to do […]
In this module we will explore the different possibilities to create animations in QML. Animations are a first-class citizen in QML; pretty much any property can be easily animated by using one of the many available animation types. We'll kickstart the first video of the series by showing you how to create and control animations and aggregate them together to build more complex ones (sequential, parallel, and so on).
Time for a little trick! When creating custom animations, it may help to run them in slow motion – just for debugging purposes, of course. This is doable by writing some C++ code, but requires poking into Qt internals. Just use GammaRay™ instead!
Flipable is a convenience component in Qt Quick that shows two different arbitrary elements: one on its front, and one on its back. Like a postcard, we can rotate the Flipable and see the other element. Flipable does not come with a built-in animation; we have to create one ourselves to make it look nicer.
In this video we'll introduce states and transitions in QML. States are a very convenient way to centralize the property values of a set of items in a user interface built in QML. While states define the values themselves, transitions define how to animate the change of the values corresponding to a state change.
Designers sometimes want to move a graphic element alongside a custom path, specified via bezier curves or SVG paths. PathAnimation is the tool for this job in QML; this video teaches you how to use it.
Qt has a long history. The first stable version was released before the first version of C++ was standardized and long before the different C++ compiler vendors started shipping usable implementations of the C++ standard library. Because of this, Qt often followed (and still follows) some design idioms that feel unnatural to the usual C++ […]
Components handling keyboard input must manage focus properly. Focus propagation between components is tricky in QML since the "focus" property has global effects. When multiple components need keyboard focus simultaneously, we must limit the "focus" property's consequences. The FocusScope element handles this by containing focus within specific areas.