About
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.
Features
- Extensive suite of unit-tests, microbenchmarks and fuzz tests
- Powerful syntax highlighting
- Line numbers, code folding, parenthesis matching and more...
- Good Unicode support
- Rich API
- Low memory usage
- Speed
Download
The most up-to-date version is found in the git repository, older version are available on the download pagegit clone git://git.tuxfamily.org/gitroot/qcodeedit/qce3.git
Dependencies
Build
Debug build (recommended until first beta release):
cd src
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
For a release build, change the build type as follows:
cmake .. -DCMAKE_BUILD_TYPE=Release
Install
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)
include(${QT_USE_FILE})
include_directories(${QCE_INCLUDE_DIRS})
# more stuff here...
target_link_libraries(... ${QT_LIBRARIES} ${QCE_LIBRARIES})
Tests
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:
./qce_document_test
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.