TS-4900 QT5 Hello World: Difference between revisions
No edit summary |
(Minor fixups) |
||
Line 1: | Line 1: | ||
Open the | Open the Qt Creator IDE and click "New Project". | ||
{| | {| | ||
| [[File:qtnewproject.png|300px|right| | | [[File:qtnewproject.png|300px|right|Qt New Project]] | ||
|} | |} | ||
Qt provides multiple templates for application development. For this example select the default "Qt Widgets Application". | |||
{| | {| | ||
| [[File:qtwidgetsapp.png|300px|right| | | [[File:qtwidgetsapp.png|300px|right|Qt Widgets App]] | ||
|} | |} | ||
Line 13: | Line 13: | ||
{| | {| | ||
| [[File:qtintorandlocation.png|300px|right| | | [[File:qtintorandlocation.png|300px|right|Qt Location]] | ||
|} | |} | ||
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 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| | | [[File:qtselectkit.png|300px|right|Qt Select Kit]] | ||
|} | |} | ||
Next select the class and filename information. This example will use the defaults. | Next select the class and filename information. This example will use the defaults. | ||
{| | {| | ||
| [[File:qtselectclasses.png|300px|right| | | [[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. | 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| | | [[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. | 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| | | [[File:qtselectbuild.png|300px|right|Qt Select build]] | ||
|} | |} | ||
Now return to edit, and open the | 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 45: | Line 45: | ||
{| | {| | ||
| [[File:qteditprojectfile.png|300px|right| | | [[File:qteditprojectfile.png|300px|right|Qt pro file]] | ||
|} | |} | ||
Line 51: | Line 51: | ||
{| | {| | ||
| [[File:qtbuildanddeploy.png|300px|right| | | [[File:qtbuildanddeploy.png|300px|right|Qt Build and Deploy]] | ||
|} | |} | ||
From here, you can begin customizing your application. Refer to the official | 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 | * [http://qt-project.org/doc/qt-5/index.html Qt 5 Documentation] |
Revision as of 12:41, 25 July 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