next up previous
Next: References Up: Appendix Previous: Listing of 'HelloQtOnNetBeans.pro'

Qt Project Properties

In the section 'A Regular Approach' the source and header files are stored in the project directory, even though they seem to be located in directories 'Source Files' and 'Header Files'. This accomplished via 'Logical Folders'. In C/C++ projects usually source files are located in subdirectories 'src' and header files in subdirectories 'include'. In this case the Qt-project file should look like:

TEMPLATE = app

# Input
INCLUDEPATH =  include
SOURCES += src/HelloQtOnNetBeans.cc
HEADERS += include/HelloQtOnNetBeans.h

# Output
TARGET = hello
DESTDIR = .

In order to make NetBeans aware of the location of the source and header files, specify for new files the folder, in which they should be stored. Existing files should be added with the specification of source- and include-folders via the 'Add Existing Items from Folders'-tab when rightclicking on the project name. In the NetBeans project-properties tab add under the tab 'Build Result' the directory and filename of the output file.

Remember, the specification of the file locations in the Qt project file and in the NetBeans project properties have to be the same!



next up previous
Next: References Up: Appendix Previous: Listing of 'HelloQtOnNetBeans.pro'

TSSE, 23 October 2008