Changes

Jump to: navigation, search

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

3,066 bytes added, 16:39, 21 February 2018
Created page with "= Installing Qt Creator = To add this new toolchain to QTCreator, run it <pre> dvdk@vagrant-ubuntu-trusty-64:~$ cd axel/ dvdk@vagrant-ubuntu-trusty-64:~/axel$ ./qt-creator-ope..."
= Installing Qt Creator =
To add this new toolchain to QTCreator, run it
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ cd axel/
dvdk@vagrant-ubuntu-trusty-64:~/axel$ ./qt-creator-opensource.run
</pre>
An installation wizard will appear

[[File:QtCreator XELK 3 0 0 01.png|200px|left|alt text]]

Clik Next to proced the installation.

[[File:QtCreator XELK 3 0 0 02.png|200px|left|alt text]]

Select Skip
[[File:QtCreator XELK 3 0 0 03.png|200px|left|alt text]]
Select Next
[[File:QtCreator XELK 3 0 0 04.png|200px|left|alt text]]
Select the install directory or click Next
[[File:QtCreator XELK 3 0 0 05.png|200px|left|alt text]]
Select Next
[[File:QtCreator XELK 3 0 0 06.png|200px|left|alt text]]
[[File:QtCreator XELK 3 0 0 07.png|200px|left|alt text]]
[[File:QtCreator XELK 3 0 0 08.png|200px|left|alt text]]
Now it is necessary to add the definition of your board before proceding developing your first application.
For adding the board definition run
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ cd axel/
dvdk@vagrant-ubuntu-trusty-64:~/axel$ ./qt-post-install.sh
</pre>
Now that the setup is finished, you can create your first application
Open a new terminal and source the enviroment variables with the command
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ ./env.sh
</pre>
In the same terminal digit the following command if you diden't change the installation directory
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ ./qtcreator-4.3.0/bin/qtcreator
</pre>
If the installation process went ok you should see inside the Tools->Options menu a Kits named XELK
[[File:QtCreator XELK 3 0 0 09.png|200px|left|alt text]]
Select the Kits tab and make sure that your configurations mateches the one displayed
[[File:QtCreator XELK 3 0 0 10.png|200px|left|alt text]]
Close the tab and create a new project
[[File:QtCreator XELK 3 0 0 11.png|200px|left|alt text]]
Select Application Qt Widgets Application and click Choose...
[[File:QtCreator XELK 3 0 0 12.png|200px|left|alt text]]
Now call the name Test and pres Next
[[File:QtCreator XELK 3 0 0 13.png|200px|left|alt text]]
Select the XELK Kit and click Next
[[File:QtCreator XELK 3 0 0 14.png|200px|left|alt text]]
Choose the class name for your application
[[File:QtCreator XELK 3 0 0 15.png|200px|left|alt text]]
Click finish and conclude the setup
[[File:QtCreator XELK 3 0 0 16.png|200px|left|alt text]]
Now you will add a button to your application. In order to do this, select from the Edit window and select Test->Forms->mainwindow.ui
[[File:QtCreator XELK 3 0 0 17.png|200px|left|alt text]]
To add a Push Button click on Push Button in the Buttons tab and drag it to the main widown view. In order to edit the text displayed by the label, dubble click it and write "Hello World!"
[[File:QtCreator XELK 3 0 0 18.png|200px|left|alt text]]
After that, you need to insert the following line inside the Test.pro file
<pro>
target.path = /tmp/Test # path on device
INSTALLS += target
</pro>
Where /temp/Test is the path in which your application will be dowloaded inside the device
[[File:QtCreator XELK 3 0 0 19.png|200px|left|alt text]]
170
edits

Navigation menu