SDAA259 January 2026 AM623 , AM625 , AM625-Q1 , AM625SIP , AM62P , AM62P-Q1
In Qt QML, a button is created using the Button component, which is part of the QtQuick.Controls module. A component in QML is simply a reusable building block, such as a window, label, button, image, or a custom UI element that is defined.
Components encapsulate both behavior and appearance, making the components simple to use and organize in a UI layout. For custom components, see the following list by QT: The QML Reference | Qt Qml | Qt 6.10.2
Figure 2-9 Adding a ButtonThe id gives the button a unique reference so the program can refer back to the button. For example, handling signals, checking the state, or modifying the properties.
The text property sets the label that appears on the button.
When a user clicks Run, the following is visible:
Figure 2-10 Modified Window with Blink ButtonThere is now a button within a window called Blink.