Jesper K. Pedersen
284 results
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.
Anchor Layout
9 January 2020
User interfaces are built by positioning controls on screen. While changing x/y coordinates works for individual items, it doesn't scale for entire interfaces. Layout managers automatically handle positioning and sizing. This video introduces Qt Quick's anchor layouts - the simplest yet most common system. Anchors "glue" element sides together, making it easy to place elements side-by-side or align within parents.
Binding Loops
9 January 2020
This video discusses the dreaded "binding loop detected" warning that comes from the QML engine. Sometimes, it's pretty clear that we have created a loop (property A depends on B, which depends on A) and we can easily fix our code. Some other times, especially when anchor layouts are involved, this is not so clear. Watch this video for an explanation of what is going wrong and how to fix it.
Colors and Gradients
9 January 2020
Qt Quick offers more than simple colored rectangles with "color: 'red'". This video demonstrates various color specification methods including HTML hex-strings and normalized RGB floating point values, plus creating gradients in Qt Quick for more sophisticated visual effects beyond basic solid colors.
Exercise: Understanding QML properties
31 October 2019
Qt Creator: How to Display Scope
31 October 2019
Understanding properties in detail
31 October 2019
A Short History of Qt
31 October 2019


