Qt is very interested recently, borrowed a few books to look at, and then downloaded from the Internet related source code to run it, behold, after opening the project compile-time prompts
An error occurred while building project EXPER3 (target: Desktop)
When you perform the build step ' qmake '
Search the Internet to find a solution, a netizen said that the compilation environment is not correct, to delete the *.pro.user file, and then restart the QT Creator, open the project, will be prompted to set up the compilation environment, which gave me a hint, think of the download of the sample source code may use the QT version is not the same It may not even be a Linux environment to use. At the same time think of Qt can be cross-platform, must take into account my problem, should be able to in the software of the project's compilation environment to set. After a little groping, we found a solution.
In the leftmost column of Qt Creator, in addition to welcome, edit, design, Debug, and projects, click "Project", will enter the project settings interface, the first tab is "Build Settings", is in this set the project's compiling environment. In the "Summary" column, the QT version shows the "Invalid qt version", stating that the QT version used by others is different from my own, decisively choosing the "QT 4.8.1 in path" that I use; there is also a "shadow Build" (Shadow build), "Building a Directory" The display is a path to the D disk, it is now clear that others are using QT in a Windows environment, and if you tick the selection box after "Shadow build", you will be prompted "warning: The building directory must be the same as the source file directory.", you need to modify the path to the same level as the Engineering folder, I don't need a shadow build here, so I'm going to remove that hook.
After this simple process, click the project's build icon again, once through, without any warning. ^_^ Run the program is also to achieve the desired effect.
In addition, I found that Qt creator after opening multiple projects, you can manually set one of the projects to be the currently active project, and the active project name will be black and bold so that the execution of the compile run debugging operation is for this active project.
Here I thought I was going to use QT for embedded development, I don't know if I could simply change the "build configuration" so that I could compile the project with a QT cross compiler, and still learn ...