The path of Linux growth (QT Creator flow account)

Source: Internet
Author: User

Jeremy

1. Create OpenCV project using QT Creator

I can't stand it. Write the OpenCV code in the text editor, a little bit of it is not, write wrong can not immediately know, so only the cock to install an IDE to write code. The following records some process and knowledge points for query ~

QT Creator is a complete C + + integrated development Environment (IDE), currently the latest version is 3.4.0. See blog for specific installation steps.

After the project is created, two files are generated, one is the C + + source code file Main.cpp, and the other is the project file Text2.pro.

(1) About the source file is not much to say, is mainc.pp created a Qcoreapplication object, and call the Exec () method. This is only necessary if the application requires the event handler to be responsible for user interaction with the GUI.

(2) Project file Text2.pro describes a QT project, which is a text file that declares a number of variables and contains information about building the project. This file will be called by the software tool Qmake when it is in the process of compiling. Each variable in the file is associated with a series of values. The main variables that qmake can identify are as follows:

    • TEMPLATE: Defines the type of project (application, library, etc.);
    • CONFIG: Specify different options for the compiler;
    • HEADERS: Lists the header files of the project;
    • SOURCES: Lists the project's source files (. cpp);
    • QT: the QT extension modules and classes required to declare. Core modules and GUI modules are included by default. If you want to remove one of these, you can use the-= statement;
    • Includepath: Specifies the folder to search for the header file;
    • LIBS: A list of library files that contain links. Use-l to specify the folder path,-l specifies the name of the library.





2, about QT Creator in the shadow Build

Recently started using Qt Creator, but found that each time the project was created, the file directory will be changed from XXXX to Build-xxxx-desktop_qt_5_4_0_gcc_64bit-debug and other naming, and later looked up, This is discovered because the shadow build was set:



When I went to get rid of shadow build, I changed back to XXXX.

Shadow Build:

Shadow build is to separate the source path and build path, that is, the generated makefile files and other products are not placed in the source path, in order to ensure that the source path clean.

For more information, please refer to: dbzhang800. Talking about the shadow build of Qmake. CSDN BLOG. Links



This address: http://blog.csdn.net/linj_m/article/details/45542377

More resources please follow blog: linjm-machine vision Weibo: Lin Jianmin-Machine Vision


The path of Linux growth (QT Creator flow account)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.