Sets construction variables for building Qt applications. QTDIR QT_BINPATH QT_CPPPATH QT_LIBPATH QT_MOC QT_UIC QT_LIB QT_AUTOSCAN QT_UICIMPLFLAGS QT_UICDECLFLAGS QT_MOCFROMHFLAGS QT_MOCFROMCXXFLAGS QT_UICDECLPREFIX QT_UICDECLSUFFIX QT_UICIMPLPREFIX QT_UICIMPLSUFFIX QT_MOCHPREFIX QT_MOCHSUFFIX QT_MOCCXXPREFIX QT_MOCCXXSUFFIX QT_UISUFFIX QT_UICCOM QT_MOCFROMHCOM QT_MOCFROMCXXCOM Builds an output file from a moc input file. Moc input files are either header files or cxx files. This builder is only available after using the tool 'qt'. See the &cv-link-QTDIR; variable for more information. Example: env.Moc('foo.h') # generates moc_foo.cc env.Moc('foo.cpp') # generates foo.moc Builds a header file, an implementation file and a moc file from an ui file. and returns the corresponding nodes in the above order. This builder is only available after using the tool 'qt'. Note: you can specify .ui files directly as source files to the &b-Program;, &b-Library; and &b-SharedLibrary; builders without using this builder. Using this builder lets you override the standard naming conventions (be careful: prefixes are always prepended to names of built files; if you don't want prefixes, you may set them to ``). See the &cv-link-QTDIR; variable for more information. Example: env.Uic('foo.ui') # -> ['foo.h', 'uic_foo.cc', 'moc_foo.cc'] env.Uic(target = Split('include/foo.h gen/uicfoo.cc gen/mocfoo.cc'), source = 'foo.ui') # -> ['include/foo.h', 'gen/uicfoo.cc', 'gen/mocfoo.cc'] The qt tool tries to take this from os.environ. It also initializes all QT_* construction variables listed below. (Note that all paths are constructed with python's os.path.join() method, but are listed here with the '/' separator for easier reading.) In addition, the construction environment variables &cv-link-CPPPATH;, &cv-link-LIBPATH; and &cv-link-LIBS; may be modified and the variables PROGEMITTER, SHLIBEMITTER and LIBEMITTER are modified. Because the build-performance is affected when using this tool, you have to explicitly specify it at Environment creation: Environment(tools=['default','qt']) The qt tool supports the following operations: Automatic moc file generation from header files. You do not have to specify moc files explicitly, the tool does it for you. However, there are a few preconditions to do so: Your header file must have the same filebase as your implementation file and must stay in the same directory. It must have one of the suffixes .h, .hpp, .H, .hxx, .hh. You can turn off automatic moc file generation by setting QT_AUTOSCAN to 0. See also the corresponding builder method .B Moc() Automatic moc file generation from cxx files. As stated in the qt documentation, include the moc file at the end of the cxx file. Note that you have to include the file, which is generated by the transformation ${QT_MOCCXXPREFIX}<basename>${QT_MOCCXXSUFFIX}, by default <basename>.moc. A warning is generated after building the moc file, if you do not include the correct file. If you are using VariantDir, you may need to specify duplicate=1. You can turn off automatic moc file generation by setting QT_AUTOSCAN to 0. See also the corresponding &b-Moc; builder method. Automatic handling of .ui files. The implementation files generated from .ui files are handled much the same as yacc or lex files. Each .ui file given as a source of Program, Library or SharedLibrary will generate three files, the declaration file, the implementation file and a moc file. Because there are also generated headers, you may need to specify duplicate=1 in calls to VariantDir. See also the corresponding &b-Uic; builder method. Turn off scanning for mocable files. Use the Moc Builder to explicitly specify files to run moc on. The path where the qt binaries are installed. The default value is '&cv-link-QTDIR;/bin'. The path where the qt header files are installed. The default value is '&cv-link-QTDIR;/include'. Note: If you set this variable to None, the tool won't change the &cv-link-CPPPATH; construction variable. Prints lots of debugging information while scanning for moc files. Default value is 'qt'. You may want to set this to 'qt-mt'. Note: If you set this variable to None, the tool won't change the &cv-link-LIBS; variable. The path where the qt libraries are installed. The default value is '&cv-link-QTDIR;/lib'. Note: If you set this variable to None, the tool won't change the &cv-link-LIBPATH; construction variable. Default value is '&cv-link-QT_BINPATH;/moc'. Default value is ''. Prefix for moc output files, when source is a cxx file. Default value is '.moc'. Suffix for moc output files, when source is a cxx file. Default value is '-i'. These flags are passed to moc, when moccing a C++ file. Command to generate a moc file from a cpp file. The string displayed when generating a moc file from a cpp file. If this is not set, then &cv-link-QT_MOCFROMCXXCOM; (the command line) is displayed. Command to generate a moc file from a header. The string displayed when generating a moc file from a cpp file. If this is not set, then &cv-link-QT_MOCFROMHCOM; (the command line) is displayed. Default value is ''. These flags are passed to moc, when moccing a header file. Default value is 'moc_'. Prefix for moc output files, when source is a header. Default value is '&cv-link-CXXFILESUFFIX;'. Suffix for moc output files, when source is a header. Default value is '&cv-link-QT_BINPATH;/uic'. Command to generate header files from .ui files. The string displayed when generating header files from .ui files. If this is not set, then &cv-link-QT_UICCOM; (the command line) is displayed. Default value is ''. These flags are passed to uic, when creating a a h file from a .ui file. Default value is ''. Prefix for uic generated header files. Default value is '.h'. Suffix for uic generated header files. Default value is ''. These flags are passed to uic, when creating a cxx file from a .ui file. Default value is 'uic_'. Prefix for uic generated implementation files. Default value is '&cv-link-CXXFILESUFFIX;'. Suffix for uic generated implementation files. Default value is '.ui'. Suffix of designer input files.