SDAA259 January   2026 AM623 , AM625 , AM625-Q1 , AM625SIP , AM62P , AM62P-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Detailed Description
    1. 2.1 Launching Qt Creator
    2. 2.2 Running The First Project on PC
    3. 2.3 Creating a Button
      1. 2.3.1 Modifying the Property of a Button
    4. 2.4 Creating a C++ Back-End Component
      1. 2.4.1 Defining the Scope of the Project
      2. 2.4.2 Connecting Your C++ Application to Your QML Application
    5. 2.5 Connecting to the EVM
    6. 2.6 Building and Deploying Your Application For Your Embedded Platform
      1. 2.6.1 Build the Application
      2. 2.6.2 Transfer Executable to the Board
    7. 2.7 Running the Application
  6. 3Summary
  7. 4References

Modifying the Property of a Button

Moving the button in the center of the screen is possible.
 Repositioning Blink ButtonFigure 2-11 Repositioning Blink Button

Use anchors. Anchors is a property within QML that allows UI elements to be positioned relative to other elements. A parent is something that can be used without manually calculating coordinates pixel by pixel. It helps define relationships between items such as the window and button. In this case, the Blink button is centered in the window.

Now when a user runs the application, the button is now centered on the screen.

 Button Repositioned in WindowFigure 2-12 Button Repositioned in Window

Can there be more than one button in the same row?

 Adding a Row ComponentFigure 2-13 Adding a Row Component

Modify the program by adding a component called Row [1]. Row is a tool to help organize all the components in one row. In this case, components are organized along the center row utilizing the vertical [2] and horizontal [3] center of the window. Now any components that are added within this scope are on the same row and centered as shown Figure 2-14.

 Multiple Components Centered Within WindowFigure 2-14 Multiple Components Centered Within Window