QCodeEdit is a powerful text editing framework written in C++ using Qt4. It aims to provide a solid foundation on which advanced language-specific editors can be built easily

Version 2 was dual-licensed under GNU GPL and a commercial license. It is no longer actively developed. Unless otherwise specified, this site only concerns QCodeEdit 3.

The upcoming version 3 will be triple licensed under GPL, LGPL and a commercial license. However, until the first stable release it is only available under a GPL license.




The most up-to-date version is found in the git repository, older version are available on the download page
git clone git://git.tuxfamily.org/gitroot/qcodeedit/qce3.git



Debug build (recommended until first beta release):

cd src
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug

For a release build, change the build type as follows:

cmake .. -DCMAKE_BUILD_TYPE=Release


The traditional install target is created by CMake

make install

If you want to change the default installation target chosen by CMake, use:

cmake .. -DCMAKE_INSTALL_PREFIX=/your/install/target

Once installed, QCodeEdit is easily usable in CMake projects:

find_package(Qt4 4.6 REQUIRED)
find_package(QCodeEdit 3.0 REQUIRED)


# more stuff here...

target_link_libraries(... ${QT_LIBRARIES} ${QCE_LIBRARIES})


QCodeEdit comes with a suite of unit tests which are built automatically along with the library. Tests are grouped by C++ class and the resulting executables follow a simple naming pattern: qce_<class>_test. For instance if you want to run the unit tests for the Document class:


In addition to unit tests, a basic text editor is provided:

./codeeditor ../../test/test-big.cpp

The tests need to be run from the build directory as they use relative path to locate some data files.