Jesper K. Pedersen
282 results
GridLayout in Qt Designer
2 September 2020
Implementing Swipe
19 June 2020
Animations in ListView
19 June 2020
GridView
19 June 2020
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
19 June 2020
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
19 June 2020
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.
Clipping
11 June 2020
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.
Collapsible Sections
11 June 2020
Customizing ListView
11 June 2020
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.
Arranging Items
11 June 2020
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 Basic Usage
11 June 2020
Introduction to Animations
14 May 2020
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).
Debug Animations with GammaRay
14 May 2020
Flipable
14 May 2020
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.
States and Transitions
14 May 2020
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.
PathAnimation
14 May 2020
Qt's model/view framework is one of Qt's most challenging aspects. While list models are relatively straightforward, tree models require handling custom indexes, causing developers frustration for over a decade. Adding proxy models for filtering/sorting and communication through proxy stacks to base models increases complexity. Custom delegates are needed for different painting and event handling per row, column, or cell.
FocusScope
7 April 2020
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.
Local Variables
7 April 2020
Never store business-related state in QML - all business logic belongs in C++. However, UI-related state (like list view scroll position) may be stored in components. This video shows introducing ad-hoc properties in component elements that act as local variables for UI state management while maintaining proper separation of concerns.
The Loader Element
7 April 2020
QML code typically creates all elements immediately, which works for simple examples but wastes resources in complex applications. Creating all screens, pages, and dialogs on startup would consume excessive resources and slow application launch. The Loader component solves this by creating elements on demand, improving performance and resource management.


