QGitTag is a library for Qt5 that uses the GitHub API to provide information about releases that can be used to check for updates.
Example:
QCoreApplication app(argc, argv);
QCoreApplication::setApplicationVersion("0.9.0");
QGitTag tag;
tag.get("crow-translate", "Crow-Translate")
connect(&tag, &QGitTag::finished, [&tag] {
QTextStream out(stdout);
if (tag.tagName() >= QCoreApplication::applicationVersion())
out << "Update available: " + tag.url().toString() << endl;
});
return QCoreApplication::exec()
For real example of usage you can look into my other project: Crow Translate.
To include the library files you could use FetchContent CMake module. Or you can add it as a git submodule to your project and include it's contents:
QMake:
include(src/third-party/qgittag/qgittag.pri)
CMake:
add_subdirectory(src/third-party/qgittag)