Access the user's calendar. More...
| Header: | #include <QPermissions> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core)target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| Since: | Qt 6.5 |
| enum | AccessMode { ReadOnly, ReadWrite } |
| QCalendarPermission::AccessMode | accessMode() const |
| void | setAccessMode(QCalendarPermission::AccessMode mode) |
By default the request is for read-only access. Use setAccessMode() to override the default.
To request this permission at runtime, the following platform specific usage declarations have to be made at build time:
| Platform | Type | |
|---|---|---|
| Apple | Usage description | NSCalendarsUsageDescription |
| Android |
uses-permission
|
android.permission.READ_CALENDAR. android.permission.WRITE_CALENDAR if QCalendarPermission::accessMode() is
set to AccessMode::ReadWrite.
|
Please see the individual usage declaration types for how to add them to your project.
See also QPermission, QCoreApplication::requestPermission(), QCoreApplication::checkPermission(), and Application Permissions.
This enum is used to control access to the calendar data.
| Constant | Value | Description |
|---|---|---|
QCalendarPermission::ReadOnly |
0 |
Read-only access to the calendar data (the default). |
QCalendarPermission::ReadWrite |
1 |
Read and write access to the calendar data. |
See also setAccessMode and accessMode.
Returns AccessMode::ReadWrite when the request is for read-write and AccessMode::ReadOnly when it is for read-only access to the calendar.
See also setAccessMode().
Sets whether the request is for read-write (mode == AccessMode::ReadWrite) or read-only (mode == AccessMode::ReadOnly) access to the calendar.
See also accessMode().
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: