官术网_书友最值得收藏!

Time for action – running the Affine Transformations project

Let's try building and running the project to check whether the building environment is configured properly. First, click on the icon in the action bar directly over the green triangle icon to open the build configuration popup, as shown in the following screenshot:

The exact content that you get may vary depending on your installation, but in general, on the left-hand side you will see the list of kits configured for the project and on the right-hand side you will see the list of build configurations defined for that kit. Choose a kit for your desktop installation and any of the configurations defined for that kit. You can adjust configurations by switching Qt Creator to the project management mode by clicking on the Projects button in the working mode selector bar. There, you can add and remove kits from the project and manage build configurations for each of the kits, as shown in the following screenshot:

You can adjust, build, and clean steps, and toggle shadow building (that is, building your project outside the source code directory tree).

To build the project, click on the hammer icon at the bottom of the action bar. You can also click on the green triangle icon to build and run the project. If everything works, after some time, the application should be launched, as shown in the next screenshot:

What just happened?

How exactly was the project built? If you open the Projects mode and look at Build Settings for a kit assigned to the project (as seen in one of the previous screenshots), you will notice that a number of build steps were defined. The first step for Qt projects is usually the qmake step, which runs a special tool that generates a Makefile for the project that is fed in the second step to a classic make tool. You can expand each of the steps by clicking on the respective Details button to see configuration options for each of the steps.

While make is considered as a standard tool for building software projects, qmake is a custom tool provided with Qt. If you go back to the Edit mode and see which files are listed in the project contents, you will notice a file with a pro extension. This is the main project file that contains a list of source and headers files in the project, definitions of Qt modules active for the project, and optionally, external libraries that the project needs to link against. If you want to learn the details of how such project files are managed, you can switch to the Help mode, choose Index from the drop-down list on the top of the window, and type qmake Manual to find the manual for the tool. Otherwise, just let Qt Creator manage your project for you. For self-contained Qt projects, you don't need to be a qmake expert.

主站蜘蛛池模板: 来安县| 临漳县| 宾川县| 抚顺市| 岐山县| 湟源县| 隆子县| 黄石市| 台南市| 邵东县| 巨野县| 大厂| 乌拉特中旗| 科技| 乐山市| 丽水市| 尼木县| 防城港市| 汕尾市| 保定市| 尚志市| 佛冈县| 洪湖市| 江达县| 烟台市| 都匀市| 阜南县| 永吉县| 淳安县| 阿城市| 佛学| 池州市| 石河子市| 宝坻区| 米林县| 威远县| 巴楚县| 手游| 遂平县| 昌江| 瑞昌市|