KConfigGui Namespace

Interface-related functions. More...

Header: #include <KConfigGui>
CMake: find_package(KF6 REQUIRED COMPONENTS Config)
target_link_libraries(mytarget PRIVATE KF6::ConfigGui)

Functions

bool hasSessionConfig()
KConfig *sessionConfig()
(since 5.11) void setSessionConfig(const QString &id, const QString &key)

Detailed Description

Function Documentation

bool KConfigGui::hasSessionConfig()

Indicates if a session config has been created for that application (i.e. if sessionConfig() got called at least once)

Returns true if a sessionConfig object was created, false otherwise

KConfig *KConfigGui::sessionConfig()

Returns the current application session config object.

Note: If Qt is built without session manager support, i.e. QT_NO_SESSIONMANAGER is defined, this by default will return nullptr, unless a custom config has been set via setSessionConfig.

Returns a pointer to the application's instance specific KConfig object.

See also setSessionConfig().

[since 5.11] void KConfigGui::setSessionConfig(const QString &id, const QString &key)

Replaces the current application session config object.

id new session id

key new session key

This function was introduced in 5.11.

See also sessionConfig().