Skip to content
Libraries for text templating with Qt
Branch: master
Clone or download
steveire Remove reference to obsolete method in docs
Remove use in example code too.
Latest commit daf1352 Jun 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake/modules Make code in docs pretty again #10 Nov 24, 2018
dox Remove reference to obsolete method in docs Jun 20, 2019
examples Remove reference to obsolete method in docs Jun 20, 2019
scripts Update clang-format settings Nov 24, 2018
templates Fix warning: catching polymorphic type ‘class Grantlee::Exception’ by… Apr 15, 2019
textdocument Format with contemporary clang-format Nov 24, 2018
.clang-format Update clang-format settings Nov 24, 2018
.travis.yml Upload coverage results to the codecov service Apr 5, 2016
AUTHORS Add the AUTHORS file. Apr 8, 2010
CHANGELOG Extend the change log for Grantlee 5.1 Apr 18, 2016
COPYING.LIB Change the licence from LGPLv3 to LGPLv2+ Mar 3, 2010
Mainpage.dox Remove note about Grantlee being experimental. Sep 24, 2014 Add appveyor build status badge Apr 3, 2016
appveyor.yml Run tests on appveyor Apr 3, 2016

The Grantlee Libraries

OSX/Linux Build Status Windows Build status

  • About Grantlee
  • Installation
  • Licensing
  • Contributing

About Grantlee

Grantlee is a set of Free Software libraries written using the Qt framework. Currently two libraries are shipped with Grantlee: Grantlee Templates and Grantlee TextDocument.

The goal of Grantlee Templates is to make it easier for application developers to separate the structure of documents from the data they contain, opening the door for theming and advanced generation of other text such as code.

The syntax uses the syntax of the Django template system, and the core design of Django is reused in Grantlee.

{% for athlete in athlete_list %}
<li>{{ }}{% if athlete.isCaptain %} (C){% endif %}</li>
{% endfor %}

Part of the design of both template systems is that application developers can extend the syntax by implementing their own tags and filters. For details of how to do that, see the API documentation.


To build Grantlee, you need at least Qt5.3 (with development packages) and CMake 3.1. Out-of-source builds are recommended:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$prefix ..
cmake --build .
cmake --build . --target install


Grantlee is covered by the GNU Lesser General Public License Version 2.1, or at your option, any later version. All contributions to Grantlee must be covered by the same license.

The details of the license are in the COPYING file in the source distribution.


Grantlee is hosted on github, and welcomes pull requests and issues.

You can’t perform that action at this time.