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 – 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.

New in version 3.0: 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.

Signals

Attributes

alias(self) → str

Returns the alias for the user profile.

Returns:If no alias is set name() is returned.
folder(self) → str

The base folder for the user profile.

icon(self) → QIcon

The icon for the user profile.

Returns:A QIcon for the users
initSettings(self)

Init the settings from the user folder.

name(self) → str

The name for the user profile.

setAlias(self, alias: str) → QgsError

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

Parameters:alias – A user friendly name for the profile.
Returns:True of setting the alias was successful.
validate(self) → QgsError

Check of the profile is in a valid state.