TS-4900 QT5 Hello World: Difference between revisions
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
|} | |} | ||
Next, select the kit. | Next, select the kit. The TSIMX6 is the kit we set up in the last section, but you may have other kits preinstalled on your system. These can be used for testing graphical development on your PC. Keep in mind distribution versions may contain different functionality. | ||
{| | |||
| [[File:qtselectkit.png|300px|right|QT Select Kit]] | |||
|} | |||
Next select the class and filename information. This example will use the defaults. | |||
{| | {| | ||
| [[File: | | [[File:qtselectclasses.png|300px|right|QT Select Classes]] | ||
|} | |||
Select any version control for the project. The example will use none and finish the wizard. This will generate the new project. | |||
{| | |||
| [[File:qtprojectmanagement.png|300px|right|QT Project Management]] | |||
|} | |} | ||
Click the button under "Help" on the left column, and select "TSIMX6" debug. If you only have one kit selected this will be default. | |||
{| | {| | ||
| [[File:qtselectbuild.png|300px|right|QT Select build]] | | [[File:qtselectbuild.png|300px|right|QT Select build]] | ||
|} | |} | ||
Now return to edit, and open the QT project file (qt5-helloworld.pro). Add in these lines after the target: | Now return to edit, and open the QT project file (qt5-helloworld.pro). Add in these lines anywhere after the target is specified: | ||
<source lang=bash> | <source lang=bash> | ||
linux-* { | linux-* { | ||
Line 35: | Line 44: | ||
</source> | </source> | ||
{| | {| | ||
| [[File: | | [[File:qteditprojectfile.png|300px|right|QT pro file]] | ||
|} | |} | ||
At this point click the green allow in the bottom left to run the application. This can also be launched from the menu at Build->Run. From here, you can begin customizing your application. Refer to the official QT documentation for more information | At this point click the green allow in the bottom left to run the application. This can also be launched from the menu at Build->Run. From here, you can begin customizing your application. Refer to the official QT documentation for more information | ||
* [http://qt-project.org/doc/qt-5/index.html QT5 Documentation] | * [http://qt-project.org/doc/qt-5/index.html QT5 Documentation] |
Revision as of 11:48, 28 February 2017
Open the QT Creator IDE and click "New Project".
QT provides multiple templates for application development. For this example select the default "QT Widgets Application".
Specify the location for your project. Keep in mind that the compile process will create more build paths in the "Create In:" path.
Next, select the kit. The TSIMX6 is the kit we set up in the last section, but you may have other kits preinstalled on your system. These can be used for testing graphical development on your PC. Keep in mind distribution versions may contain different functionality.
Next select the class and filename information. This example will use the defaults.
Select any version control for the project. The example will use none and finish the wizard. This will generate the new project.
Click the button under "Help" on the left column, and select "TSIMX6" debug. If you only have one kit selected this will be default.
Now return to edit, and open the QT project file (qt5-helloworld.pro). Add in these lines anywhere after the target is specified:
linux-* {
target.path = /home/root/
INSTALLS += target
}
At this point click the green allow in the bottom left to run the application. This can also be launched from the menu at Build->Run. From here, you can begin customizing your application. Refer to the official QT documentation for more information