Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX-L-AN-0007: Getting Started With QT Creator

512 bytes added, 14:23, 26 August 2022
m
{{InfoBoxTop}}
{{AppliesToAxel}}{{AppliesToAxelEsatta}}{{AppliesToAxelLite}}{{Applies To YoctoAppliesToAXEL Lite AN}}
{{InfoBoxBottom}}
{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}
|First release
|-
|{{oldid|8847|2.0.0}}
|August 2019
|[[Axel_Embedded_Linux_Kit_(XELK)#XELK_software_components|XELK 4.0.0]]
This application note details QT Creator setup and configuration in [[DESK-MX6-L|DESK-MX6-L]] [[Managed Virtual Machine (MVM)|MVM]]
= Setting up Qt Creator to build for XELK DESK-MX6-L =
{{ImportantMessage|text=Note: The version of Qt Creator may differ from images below. The version used is the release is 4.4.1 which can be downloaded form [https://download.qt.io/archive/qtcreator/4.4/4.4.1/ Qt archive server]}}
[[File:QtCreator-4.4.1_devices-linux-device.png|500px|border|center]]
Insert the IP address of your device, ''root'' as username and leave password empty (this is the default configuration of XELK DESK-MX6-L root file systems). Make sure that the device is connected to the network and your virtual machine networking is correctly configured (see [[VirtualBox Network Configuration|this]] article for more details).
Then click '''Next''':
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ ./qtcreator-4.54.21/bin/qtcreator
</pre>
Now click on <code>New Project</code>
[[File:QtCreator XELK 3 0 0 11-4.4.1_project.png|400px1200px|border|center]]
Select Application Qt Widgets Application and click '''Choose...'''
[[File:QtCreator XELK 3 0 0 12-4.4.1_new-project.png|400px800px|border|center]]
Now call the Project ''Test'' and press '''Next'''.
[[File:QtCreator XELK 3 0 0 13-4.4.1_new-project-test.png|400px800px|border|center]]
Select the ''XELK KitSBC AXEL EVK'' and click '''Next'''.
[[File:QtCreator XELK 3 0 0 14-4.4.1_new-project-SBC-AXEL-EVK.png|400px800px|border|center]]
Choose the ''class'' name for your application.
[[File:QtCreator XELK 3 0 0 15-4.4.1_new-project-SBC-AXEL-EVK-class.png|400px800px|border|center]]
Click '''Finish''' to conclude the setup.
[[File:QtCreator XELK 3 0 0 16-4.4.1_new-project-SBC-AXEL-EVK-finish.png|400px800px|border|center]]
To add a clickable button to your application, select the <code>Edit</code> window and select <code>Test -> Forms -> mainwindow.ui</code>
[[File:QtCreator XELK 3 0 0 17-4.4.1_project-Test-MainWindow.png|400px1200px|border|center]]
Click on Push Button in the Buttons tab and drag it to the main window view. In order to edit the text displayed by the label, double click it and write ''"Hello World!"''.
[[File:QtCreator XELK 3 0 0 18-4.4.1_project-Test-MainWindow-Pushbutton.png|400px1200px|border|center]]
After that, you need to insert the following two line inside the ''Test.pro'' file
<pre>
target.path = /tmphome/root/Test # path on device
</pre>
<pre>
</pre>
Where <code>/temphome/root/Test</code> is the path in which your application will be downloaded inside the device.
[[File:QtCreator XELK 3 0 0 19-4.4.1_project-Test-MainWindow-TestPro.png|1200px|border|center]] Build the project in order to complete the configuration and set the overall vars: [[File:QtCreator-4.4.1_project-Test-MainWindow-Build.png|400px1200px|border|center]]
The last step before running the application inside the device is to configure Qt backend into application command line arguments: open the <code>Project</code> window and select the <code>Run</code> configuration, then type <code>-platform eglfs</code> into <code>Arguments</code>
[[File:QtCreator XELK 3 0 0 20-4.4.1_project-Test-MainWindow-eglfs.png|400px1200px|border|center]]
After these changes you are ready to debug your application inside your board with the <code>Run/Debug</code> command [[File:QtCreator XELK 3 0 0 35.png|30px]]
[[File:QtCreator XELK 3 0 0 21-4.4.1_project-Test-MainWindow-debug.png|1200px|border|center]] The debugger (via <code>gdb server</code>) will be activated and the debug window will be ready: [[File:QtCreator-4.4.1_project-Test-MainWindow-debug-running.png|400px1200px|border|center]]
8,226
edits