%scons; %builders-mod; %functions-mod; %tools-mod; %variables-mod; ]> Sets &consvars; for building Qt3 applications. This tool is only suitable for building targeted to Qt3, which is obsolete (the tool is deprecated since 4.3). There are contributed tools for Qt4 and Qt5, see https://github.com/SCons/scons-contrib. Qt4 has also passed end of life for standard support (in Dec 2015). Note paths for these &consvars; are assembled using the os.path.join method so they will have the appropriate separator at runtime, but are listed here in the various entries only with the '/' separator for simplicity. In addition, the &consvars; &cv-link-CPPPATH;, &cv-link-LIBPATH; and &cv-link-LIBS; may be modified and the variables &cv-link-PROGEMITTER;, &cv-link-SHLIBEMITTER; and &cv-link-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 &t-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 &cv-link-QT_AUTOSCAN; to False. See also the corresponding &b-link-Moc; Builder. Automatic moc file generation from C++ files. As described in the Qt documentation, include the moc file at the end of the C++ file. Note that you have to include the file, which is generated by the transformation ${QT_MOCCXXPREFIX}<basename>${QT_MOCCXXSUFFIX}, by default <basename>.mo. A warning is generated after building the moc file if you do not include the correct file. If you are using &f-link-VariantDir;, you may need to specify duplicate=True. You can turn off automatic moc file generation by setting &cv-QT_AUTOSCAN; to False. See also the corresponding &b-link-Moc; Builder. 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 &b-link-Program;, &b-link-Library; or &b-link-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=True in calls to &f-link-VariantDir;. See also the corresponding &b-link-Uic; Builder. 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 QTDIR Builds an output file from a moc input file. moc input files are either header files or C++ files. This builder is only available after using the tool &t-link-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 that order. This builder is only available after using the tool &t-link-qt;. Note: you can specify .ui files directly as source files to the &b-link-Program;, &b-link-Library; and &b-link-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 path to the Qt installation to build against. If not already set, &t-link-qt; tool tries to obtain this from os.environ; if not found there, it tries to make a guess. Turn off scanning for mocable files. Use the &b-link-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 C++ file. Default value is '.moc'. Suffix for moc output files when source is a C++ file. Default value is '-i'. These flags are passed to moc when moccing a C++ file. Command to generate a moc file from a C++ file. The string displayed when generating a moc file from a C++ 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 C++ 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 header 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 C++ 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.