C

QAndroidUserProfiles Class

Enables access to basic user related views. (Technical Preview). More...

Header: #include <QAndroidUserProfiles>
CMake: find_package(Qt6 REQUIRED COMPONENTS AndroidAutomotiveBase)
target_link_libraries(mytarget PRIVATE Qt6::AndroidAutomotiveBase)
Since: QtAndroidAutomotive 6.5
Inherits: QObject

Properties

Public Functions

QAndroidUserDetails *currentUserDetails() const
bool showUserPropertiesView()
(since Android 11) bool showUserSwitcherView()

Detailed Description

QAndroidUserProfiles allows you to access basic Android user functionality.

Property Documentation

[read-only] currentUser : QAndroidUserDetails* const

This property holds the data about currently logged in user.

Access functions:

QAndroidUserDetails *currentUserDetails() const

Member Function Documentation

QAndroidUserDetails *QAndroidUserProfiles::currentUserDetails() const

Returns data about currently logged in user.

Note: Getter function for property currentUser.

[invokable] bool QAndroidUserProfiles::showUserPropertiesView()

Shows the Android's User Properties activity, which enables editing the current user's name. If the current user is admin, the activity allows also the addition of a new user, as well as editing other users' permissions.

Returns false if showing the activity failed.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

[invokable, since Android 11] bool QAndroidUserProfiles::showUserSwitcherView()

Shows the Android's User Switch view. That view enables changing the current user.

Returns false if showing the activity failed.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

This function was introduced in Android 11.

Available under certain Qt licenses.
Find out more.