qt:project_structure
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
qt:project_structure [2010/12/08 19:54] – [Project description files] mithat | qt:project_structure [2011/04/01 11:01] – [Source files] mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Project structure ====== | ====== Project structure ====== | ||
- | There are two views we can take toward how Qt projects are structured: the file view and the workflow view. Depending on how your brain works and/or the issue you are trying to understand, one of these will work better than the other. In all probability, | + | There are two views you can take toward how Qt projects are structured: the file view and the workflow view. Depending on how your brain works and/or the issue you are trying to understand, one of these will work better than the other. In all probability, |
===== The file view ===== | ===== The file view ===== | ||
- | A Qt project is a collection of project description files, source code files, resource files, and binary output files. | + | A Qt project is a collection of project description files, source code files, resource files, and binary output files. |
==== Project description files ==== | ==== Project description files ==== | ||
+ | === Explicitly generated === | ||
* **'' | * **'' | ||
* The [[qt: | * The [[qt: | ||
Line 17: | Line 18: | ||
==== Source files ==== | ==== Source files ==== | ||
+ | === Explicitly generated === | ||
* **'' | * **'' | ||
- | * The project' | + | * The project' |
* The name of this file is a convention, not a requirement. | * The name of this file is a convention, not a requirement. | ||
* **'' | * **'' | ||
* C++ class header and implementation files for a class that you derived from QObject (if needed). | * C++ class header and implementation files for a class that you derived from QObject (if needed). | ||
- | * May contain | + | * Probably containd |
* There may be more than one of these. | * There may be more than one of these. | ||
* **'' | * **'' | ||
Line 37: | Line 39: | ||
==== Resources ==== | ==== Resources ==== | ||
+ | === Explicitly generated === | ||
* **'' | * **'' | ||
* A Qt [[http:// | * A Qt [[http:// | ||
* You can have more than one of these. | * You can have more than one of these. | ||
- | * Automatically processed by '' | + | * Automatically processed by '' |
+ | === Automatically generated === | ||
+ | * **'' | ||
+ | * cpp file that contains data for the resources mentioned in '' | ||
+ | * Automatically generated and linked to the project when [[qmake]] is run (assuming it's mentioned in the *.pro file). | ||
==== Binary output ==== | ==== Binary output ==== | ||
Line 47: | Line 54: | ||
===== The workflow view ===== | ===== The workflow view ===== | ||
- | The typical Qt project workflow consists of the following major phases: creating a project, adding files to a project, building and testing a project. These are discussed below. | + | The typical Qt project workflow consists of the following major phases: creating a project, adding files to a project, building and testing a project. These are discussed below.((These phases hold true whether you are using a IDE or a simple command line based environment. However, an IDE will typically manage many of these tasks for you.)) |
==== Creating a project ==== | ==== Creating a project ==== | ||
Line 61: | Line 68: | ||
- Create the desired *.h, *.cpp, *.ui, and *.qrc source files in the project directory and edit to your heart' | - Create the desired *.h, *.cpp, *.ui, and *.qrc source files in the project directory and edit to your heart' | ||
- Edit '' | - Edit '' | ||
- | - Run <code bash> | + | - Run <code bash> |
Notes: | Notes: | ||
- | * Repeat the above as needed. Whenever you add new files, be sure to reflect those changes into the *.pro file and regenerate the Makefile | + | * Repeat the above as needed. |
+ | * Whenever you add new files, be sure to reflect those changes into the *.pro file and rerun '' | ||
* Assuming {directory-name}.pro is correctly configured, the Makefile generated by '' | * Assuming {directory-name}.pro is correctly configured, the Makefile generated by '' | ||
qt/project_structure.txt · Last modified: 2011/04/01 11:01 by mithat