QLibraryInfo Class
The QLibraryInfo class reports how the Nt library was built. More…
| Header | #include <QLibraryInfo> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
List of all members, including inherited members
Static Public Members
| QVersionNumber | version() |
| const char * | build() |
| bool | isDebugBuild() |
| bool | isSharedBuild() |
Detailed Description
version() returns the version of the library the program is running against, which comes from the VERSION file at the root of the Nt repository:
if (QLibraryInfo::version() < QVersionNumber(6, 1))
qWarning() << "This program needs Nt 6.1 or newer";
See also QVersionNumber.
Differences from Qt
There is no path() or platformPluginArguments(), as Nt has no installed plugin or translation directories yet.
Member Function Documentation
const char * QLibraryInfo::build()
Returns a line of text describing the build, including the version.
See also version().
bool QLibraryInfo::isDebugBuild()
Returns true if the library was built with debugging enabled.
bool QLibraryInfo::isSharedBuild()
Returns true if Nt is a shared library rather than a static one.
QVersionNumber QLibraryInfo::version()
Returns the version of the Nt library. It is compiled into the library, so a program built against other headers still sees the version it runs with.
See also build().