QContactsPermission#
Access the user’s contacts. More…
New in version 6.5.
Synopsis#
Functions#
def
accessMode
()def
setAccessMode
(mode)def
swap
(other)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
By default the request is for read-only access. Use setAccessMode()
to override the default.
Requirements#
To request this permission at runtime, the following platform specific usage declarations have to be made at build time:
Platform
Type
Apple
Usage description
NSContactsUsageDescription
Android
uses-permission
:ref:` <Application-Permissions>`
android.permission.READ_CONTACTS
.android.permission.WRITE_CONTACTS
ifaccessMode()
is set to AccessMode::ReadWrite.
Please see the individual usage declaration types for how to add them to your project.
See also
QPermission
requestPermission()
checkPermission()
Application Permissions
- class PySide6.QtCore.QContactsPermission#
PySide6.QtCore.QContactsPermission(other)
- Parameters:
- PySide6.QtCore.QContactsPermission.AccessMode#
This enum is used to control access to the contacts data.
Constant
Description
QContactsPermission.ReadOnly
Read-only access to the contacts data (the default).
QContactsPermission.ReadWrite
Read and write access to the contacts data.
See also
- PySide6.QtCore.QContactsPermission.accessMode()#
- Return type:
Returns AccessMode::ReadWrite when the request is for read-write and AccessMode::ReadOnly when it is for read-only access to the contacts.
See also
- PySide6.QtCore.QContactsPermission.setAccessMode(mode)#
- Parameters:
mode –
AccessMode
Sets whether the request is for read-write (mode
== AccessMode::ReadOnly) or read-only (mode
== AccessMode::ReadOnly) access to the contacts.
See also
- PySide6.QtCore.QContactsPermission.swap(other)#
- Parameters: