Class: QgsUserProfile

class qgis.core.QgsUserProfile(folder: str)

Bases: sip.wrapper

Reference to a existing user profile folder. Profile folder should be created using QgsProfileManager.

Parameters

folder (str) – An existing profile folder as the base of the user profile.

QgsUserProfile(QgsUserProfile)

User profile contains information about the user profile folders on the machine. In QGIS 3 all settings, plugins, etc were moved into a %APPDATA%/profiles folder for each platform. This allows for manage different user profiles per machine vs the single default one that was allowed in the past.

A user profile is all settings and anything that used to be found in .qgis3 in the users home folder.

Methods

alias

Returns the alias for the user profile.

folder

The base folder for the user profile.

icon

The icon for the user profile.

initSettings

Init the settings from the user folder.

name

The name for the user profile.

setAlias

Set the alias of the profile.

validate

Check of the profile is in a valid state.

alias(self) → str

Returns the alias for the user profile.

Return type

str

Returns

If no alias is set name() is returned.

folder(self) → str

The base folder for the user profile.

Return type

str

icon(self) → QIcon

The icon for the user profile.

Return type

QIcon

Returns

A QIcon for the users

initSettings(self)

Init the settings from the user folder.

name(self) → str

The name for the user profile.

Return type

str

setAlias(self, alias: str)QgsError

Set the alias of the profile. The alias is a user friendly name.

Parameters

alias (str) – A user friendly name for the profile.

Return type

QgsError

Returns

True of setting the alias was successful.

validate(self)QgsError

Check of the profile is in a valid state.

Return type

QgsError