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

From DAVE Developer's Wiki
Revision as of 16:39, 21 February 2018 by U0013 (talk | contribs) (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...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Installing Qt Creator[edit | edit source]

To add this new toolchain to QTCreator, run it

dvdk@vagrant-ubuntu-trusty-64:~$ cd axel/
dvdk@vagrant-ubuntu-trusty-64:~/axel$ ./qt-creator-opensource.run

An installation wizard will appear

alt text

Clik Next to proced the installation.

alt text

Select Skip

alt text

Select Next

alt text

Select the install directory or click Next

alt text

Select Next

alt text
alt text
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

dvdk@vagrant-ubuntu-trusty-64:~$ cd axel/
dvdk@vagrant-ubuntu-trusty-64:~/axel$ ./qt-post-install.sh

Now that the setup is finished, you can create your first application Open a new terminal and source the enviroment variables with the command

dvdk@vagrant-ubuntu-trusty-64:~$ ./env.sh

In the same terminal digit the following command if you diden't change the installation directory

dvdk@vagrant-ubuntu-trusty-64:~$ ./qtcreator-4.3.0/bin/qtcreator

If the installation process went ok you should see inside the Tools->Options menu a Kits named XELK

alt text

Select the Kits tab and make sure that your configurations mateches the one displayed

alt text

Close the tab and create a new project

alt text

Select Application Qt Widgets Application and click Choose...

alt text

Now call the name Test and pres Next

alt text

Select the XELK Kit and click Next

alt text

Choose the class name for your application

alt text

Click finish and conclude the setup

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

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!"

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

alt text