QOwnNotes is an open source notepad with Markdown support and todo list manager for GNU/Linux, macOS, and Windows. It works together with Nextcloud Notes and ownCloud Notes.
- Language: C++
- Framework: Qt (supports both Qt5 and Qt6)
- Build Systems:
- qmake (
.profiles) - Primary build system - CMake (
CMakeLists.txt) - Alternative build system
- qmake (
- Task Runner: just (justfile)
Use the just task runner to build the application:
just src-buildThis command will:
- Check qmake version
- Create the
build-QOwnNotesdirectory - Run qmake with debug configuration and system Botan
- Build using all available CPU cores with
make -j$(nproc)
- Run tests:
just src-test(orjust test) - Clean build directory:
just src-clean - Build and run:
just src-build-run - Run built application:
just src-run
For Nix users, multiple build options are available:
- Qt6 build:
just nix-buildorjust nix-build-qt6 - Qt5 build:
just nix-build-qt5 - Force rebuild:
just nix-build-force
Alternatively, use CMake for building:
mkdir build && cd build
# Configure with Qt6
cmake ../src -DQON_QT6_BUILD=ON -DDEV_MODE=ON -DCMAKE_BUILD_TYPE=Debug
# Or with Qt5 (default)
cmake ../src -DDEV_MODE=ON -DCMAKE_BUILD_TYPE=Debug
# Build
make -j4Available CMake Options:
QON_QT6_BUILD=ON- Build with Qt6 (default: OFF, uses Qt5)DEV_MODE=ON- Enable developer mode with extra warningsBUILD_WITH_LIBGIT2=ON- Use system libgit2 libraryBUILD_WITH_ASPELL=ON- Enable aspell spell checking supportUSE_QLITEHTML=ON- Use QLiteHtml for previewCMAKE_BUILD_TYPE=Debug|Release- Build type
Example with multiple options:
cmake ../src \
-DQON_QT6_BUILD=ON \
-DDEV_MODE=ON \
-DBUILD_WITH_LIBGIT2=ON \
-DBUILD_WITH_ASPELL=ON \
-DCMAKE_BUILD_TYPE=Debugsrc/- Main source code directoryQOwnNotes.pro- Main qmake project fileCMakeLists.txt- CMake build configurationlibraries/- Third-party libraries (submodules)
tests/- Test filesbuild-QOwnNotes/- Default build directory (gitignored)justfile- Task runner configurationscripts/- Helper scriptsdocs/- Documentation
- Qt Core, GUI, Widgets, SQL, SVG, Network, XML
- Qt PrintSupport, QML, WebSockets, Concurrent
- Qt Quick (for Qt6, enables more scripting options)
- Botan: Cryptographic library (can use system or internal version)
- Default build uses system Botan:
USE_SYSTEM_BOTAN=1
- Default build uses system Botan:
- Aspell: Spell checking support
- QLiteHtml: HTML rendering (optional, enable with
USE_QLITEHTML)
- Debug Mode:
CONFIG+=debug- Includes debug symbols - Dev Mode:
CONFIG+=DEV_MODE- Enables higher warning levels and precompiled headers - Integration Tests:
DEFINES+=INTEGRATION_TESTS- For test builds
- CMAKE_BUILD_TYPE=Debug - Debug build with symbols
- CMAKE_BUILD_TYPE=Release - Optimized release build
- DEV_MODE=ON - Developer mode with extra warnings and -Werror on Linux
- INTEGRATION_TESTS - For test builds
The recommended development build uses:
qmake:
qmake "CONFIG+=debug USE_SYSTEM_BOTAN=1" ../src/QOwnNotes.pro CONFIG+=DEV_MODECMake:
cmake ../src -DCMAKE_BUILD_TYPE=Debug -DDEV_MODE=ONRun the test suite:
just src-testThis will:
- Build tests in
build-tests-QOwnNotes/directory - Run tests in minimal platform mode
- Clean up the test build directory
For VM tests (integration tests):
just vm-testFormat the entire project with clang-format:
just clang-format
# Or aliases:
just fix-linting
just linter-fixValidate links in Markdown files:
just link-check- Download translations:
just translations-download - Build translations:
just translations-build - Upload to Crowdin:
just translations-upload - Update translation files:
just translations-update-files - Generate changelog line:
just translations-changelog(outputs a line like- Added more ... translation (thank you, ...))
Translations are managed via Crowdin: https://crowdin.com/project/qownnotes
- Always use
just nix-buildto build the project - Don't try to run qmake/make directly unless specifically requested - The project uses Qt/C++ - Be mindful of Qt's signal/slot mechanism, QObject lifecycle, and Qt-specific patterns
- Submodules are used - Libraries in
src/libraries/are git submodules - Multiple Qt versions supported - Code must work with both Qt 5.7+ and Qt6 (use Preprocessor Directives like
#if QT_VERSION < QT_VERSION_CHECK(5, 9, 0)to handle differences) - Cross-platform - Code must work on Linux, macOS, and Windows
- Two build systems available - Primary is qmake (
.profiles), but CMake (CMakeLists.txt) is also supported - Build projects - The primary build project files are
src/QOwnNotes.proandsrc/CMakeLists.txt - Development mode - Use
CONFIG+=DEV_MODEfor qmake or-DDEV_MODE=ONfor CMake in active development -. Version bumping - Updatesrc/version.handsrc/build_number.h,BUILDjust needs to be increase by one - Version format isMAJOR.MINOR.PATCH(e.g.22.12.0), build number is a separate integer that increments with each release - The MAJOR part is always the last two digits of the year of the release (e.g.22for 2022), - The MINOR part is the month of the release (e.g.12for December), - The PATCH part is a counter that starts at0and increments with each release in the same month (e.g.0for the first release in December 2022,1for the second release in December 2022, etc.) - This project has translations - They can be found in the
src/translations/directory as.tsfiles - Comments - Always write clear and concise comments for complex logic, especially when dealing with Qt-specific features, start comments with uppercase letters
- Changelog - Update the changelog with each release, following the format in
CHANGELOG.md
- Qt 5.5+ or Qt 6.0+
- GCC 4.8+
- Desktop operating system supporting Qt
- Website: https://www.qownnotes.org
- Documentation: https://www.qownnotes.org/getting-started/concept.html
- GitHub Issues: https://github.com/pbek/QOwnNotes/issues
- Script Repository: https://github.com/qownnotes/scripts
- Changelog: https://www.qownnotes.org/changelog.html
# Build and run
just src-build-run
# Run tests
just test
# Format code
just clang-format
# Clean build
just src-clean
# List all available commands
just --list