Skip to content

inkgnt/qsqlcipher-qt6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLCipher Plugin for Qt6

A CMake-based project that automatically fetches, patches, and builds the QSQLCIPHER plugin.

Features

  • Supports all Qt 6.x.x versions;
  • Fully cross-platform;
  • Supports both static and dynamic linking of SQLCipher and OpenSSL;
  • Isolated from the default QSQLITE driver;
  • Easy to audit: You can easily verify the exact code modifications by reviewing patch files.

Requirements

  • Git
  • Qt 6.x.x
  • CMake 3.24 and higher with Ninja CMake Generator
  • SQLCipher
  • OpenSSL

Usage

First, ensure that SQLCipher and OpenSSL are resolvable via find_package. You can use any package manager you prefer or rely on system packages.

CMake Integration Example

You need to set CMAKE_FIND_PACKAGE_TARGETS_GLOBAL=TRUE before find_package to avoid target promotion error when building Qt plugins from source.

Note: This variable is required because the target promotion error occurs not only with SQLCipher and OpenSSL, but also with internal system dependencies that Qt resolves during the plugin build process (such as Threads::Threads or WrapAtomic::WrapAtomic).

set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE)

find_package(OpenSSL REQUIRED)
find_package(sqlcipher REQUIRED)

add_subdirectory(qsqlcipher-qt6)

C++

Use it just like a standard QSqlDatabase, but pass the key with QSqlDatabase::setPassword or PRAGMA key before opening.

License

This project is licensed under the MIT License.
See the LICENSE file for details.

Third-party components

This project includes third-party software components, each subject to its own license terms. Full copyright and licensing information is provided in the NOTICE file.

About

Standalone SQLCipher alternative to the default SQLite plugin for Qt6. CMake-ready, cross-platform, and easy to integrate

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages