KDAB_Tree_Header_Mobile KDAB_Tree_Header_Web

Trusted Software Excellence since 1999

Jesper K. Pedersen

269 results

This video shows how to launch GammaRay right from within Qt Creator, with a convenient keyboard shortcut.

We should use layouts to arrange child widgets in containers. Layouts work automatically, except when they don't! Sometimes we need to fine-tune layout decisions, particularly when they incorrectly handle padding and margins for contents.

When an application is being introspected by GammaRay, you can use Control + Shift + Mouse click on any of its widgets to select it for further inspection. This lets you check all the properties for the widget, its positioning, as well as simply get an answer to the question: of which class is this widget?

We talk about headers in a QTableView. Were you ever slightly annoyed by the fact that you can click on a header and sort the table by the corresponding column, but then you cannot undo the sorting? Let's fix that!

Clang-format is a tool that can automatically reformat your source code. Not only can you run it manually to apply a given formatting, but you can set it up so that it automatically reformats the code when committing into git, or when saving in Qt Creator.

If you find yourself working on a number of projects in Qt Creator and you quickly want to switch between them, just use a different session for each one! Sessions will remember open documents, cursor positions, and much more.

This video visits Qt Designer, this time to discuss combo boxes. Mapping a QComboBox's entry to a specific value is easy in C++, but not so easy when the combo box is populated from within Qt Designer. How do we improve the situation?

In this video, the first of the Qt Widgets series, we show you a few ways to improve your workflow when using a QGridLayout inside Qt Designer. Though it sounds simple, there are a few subtleties involved.

This video shows you how to configure ListView to move by just one element at a time, effectively implementing a form of swiping through pages.

This video discusses ListView's built-in capabilities for animations. When a ListView is populated, or entries are added or removed from the model, etc., ListView can automatically trigger animations on the affected items.

GridView is a strict companion of ListView. As the name says, it's a view – something that shows delegates, instantiated from a model. The delegates are arranged in a reflowing grid, rather than in a vertical or horizontal sequence – a bit like a file manager in icon mode. Apart from this, GridView is extremely similar to ListView.

PathView is closely related to PathAnimation: it's a view that arranges its elements on an arbitrary path. The delegates instantiated by the PathView will move, like a carousel, on the path provided by the user. In extra features, we specify how to transform each delegate as it moves along the path (by modifying arbitrary properties such as scale, opacity, and so on).

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.

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.

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!

JesperKjaerPedersen

Jesper K. Pedersen

HR Director / COO