https://github.com/rtbo/qtgentools
Qt Code Generation Tools Utility
https://github.com/rtbo/qtgentools
Last synced: 11 months ago
JSON representation
Qt Code Generation Tools Utility
- Host: GitHub
- URL: https://github.com/rtbo/qtgentools
- Owner: rtbo
- License: other
- Created: 2013-09-01T16:47:57.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-18T11:11:28.000Z (over 12 years ago)
- Last Synced: 2025-03-25T22:18:49.689Z (about 1 year ago)
- Language: C++
- Size: 188 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
QtGenTools - Qt Code Generation Tools Utility
Author: Remi THEBAULT - remi.thebault@gmail.com
Copyright (C) 2013, Remi THEBAULT
Description:
------------
Small and simple command line utility that calls moc, uic and rcc.
It parses recursively an input directory and look for input files.
Generated code files are written to the output directory.
For each input file, it compares last modification date and do not
modify the output file if not necessary. For rcc, if does the same
comparison with the input files too.
This utility is useful if you want to use Qt without qmake, for example
with Microsoft Visual C++ Express.
It is compatible with Windows, Linux and MacOSX.
Moc:
input files must be header (with extension .h, .hpp, .hh, .hxx) and
contain the string 'Q_OBJECT'. Output files are C++ source prefixed
by "mo_" and with extension ".cc"
Uic:
Input files must have extension .ui. Output files are C++ headers prefixed
by "ui_" and with extension ".h"
Rcc:
Input files must have extension .qrc. Output files are C++ source prefixed
by "rc_" and with extension ".cc"
The generated files can be afterwards added in your IDE project or build system.
Synopsis:
---------
Usage: QtGenTools --inD= --outD= [Options]
Options:
--inD= Specify the input directory (mandatory)
--outD= Specify the output directory (mandatory)
--mocOpts= Command line options given to moc
--uicOpts= Command line options given to uic
--rccOpts= Command line options given to rcc
Example of use:
---------------
QtGenTools --inD=YourProjectDir --outD=YourProjectDir/QtGen
--mocOpts=-b"stdafx.h"
This command will parse YourProjectDir, find all Qt input files,
run the appropriate tools and place generated code files in
YourProjectDir/QtGen.
In addition, with this example, meta-object files will have
#include "stdafx.h" as first directive, and be compatible with
precompiled headers.
This command can be added as a pre build step in your favorite IDE or
build system in order to update the generated files when needed.
Enjoy!