Jesper K. Pedersen
292 results
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.
Custom Components
7 April 2020
In the fourth module of our "Introduction to Qt / QML" series we explore components: that is, how to reuse QML code by encapsulating it in a separate piece that we can then create as many times as needed. In this video, the basics of creating an "out-of-line" component is defined as well as how to define a proper API for our components.
Sizing Components
7 April 2020
Keyboard Input
17 February 2020
This video discusses keyboard handling in Qt Quick. Whether you have a physical keyboard, a virtual one, or maybe some special hard keys, you may want to have the elements in your scene react to the keypresses. There are a few ways to manage keyboard input: from just using an element such as TextInput, that solves the whole problem for us, to actually having custom logic to handle keyboard events.
Gestures Support
14 February 2020
Touch input extends beyond simple tapping to include gestures like flick motions for scrolling and pinch-to-zoom with two fingers. This video explains Qt Quick's gesture handling basics using built-in elements, demonstrating how to create touch interfaces by composing gesture elements with familiar components like images, rectangles, and text.
Searching the Qt Source Code
14 February 2020
Sometimes you need to explore Qt's source code to understand behavior, track bugs, or learn implementation details. Qt is open source with high-quality, readable code available through download or binary installers. This video demonstrates setting up Qt Creator to quickly navigate Qt's source code using Locator shortcuts for efficient exploration.
Mouse and Touch Handling
14 February 2020
The third module of the "Introduction to Qt/QML" series covers user interaction methods in Qt Quick applications. Qt Quick provides elements for mouse, touch, gesture, and keyboard input. This video focuses on MouseArea, the element handling mouse input, demonstrating how to make applications react to mouse presses, clicks, and other mouse interactions.
Images
9 January 2020
Item Transformations
9 January 2020
Introducing the most basic visual transformations that you can apply to items in a Qt Quick scene. Any visual item can be scaled, rotated, or made translucent by acting on certain properties. This video explains how these properties work, and how visual transformations are propagated to children elements.
Custom Transformations
9 January 2020
The transformations introduced in the previous video are not everything that Qt Quick offers. Sometimes we may need to rotate an item around an arbitrary point, or shear it using a custom 4x4 matrix. This video will feature an example of a custom visual transformation: we will create a very simple analog clock by rotating two images around a custom point.


