Jump to content

ShareKit Namespace

From Qt Wiki
Revision as of 05:55, 28 January 2026 by Shawn Luo (talk | contribs)

ShareKit Namespace

(QtOhosExtras::ShareKit)

The ShareKit to expose Share Kit API. More...

Header: #include
qmake: QT += ohosextras
Since: Qt 5.12.12



Classes

Types

enum ShareAbilityType { CopyToPasteboard, SaveToMediaAsset, SaveAsFile, Print, SaveToSuperHub }


Functions

QSharedPointer createContentRecord(const QMimeType &mimeType, const QString &content)
QSharedPointer createControllerOptions()
QSharedPointer createFileRecord(const QFileInfo &fileInfo)
QSharedPointer createUrlRecord(const QUrl &url)


Detailed Description

The ShareKit to expose Share Kit API.


Classes

class QOhosShareControllerOptions

The QOhosShareControllerOptions class is to configure items, such as the preview mode of the shared content, selection mode, and other information, and pop-up window anchor. It determines the display style of the sharing panel. See ShareControllerOptions. More...

class QOhosSharedRecord

The QOhosSharedRecord class represents a record to be shared with other application. A record can be created using. More...


Type Documentation

enum ShareKit::ShareAbilityType

Function Documentation

[[../qtcore/qsharedpointer.html|QSharedPointer]]<QtOhosExtras::ShareKit::QOhosSharedRecord> ShareKit::createContentRecord(const [[../qtcore/qmimetype.html|QMimeType]] &mimeType, const [[../qtcore/qstring.html|QString]] &content)

Creates a shared "content" record with a given mimeType and content. Shared record can be created with content (this function) or as a file shared record

See SharedRecord.content

See also QtOhosExtras::ShareKit::createFileRecord() and ..

[[../qtcore/qsharedpointer.html|QSharedPointer]]<QtOhosExtras::ShareKit::QOhosShareControllerOptions> ShareKit::createControllerOptions()

Creates a controller options instnace. Controller options can be used to configure preview mode, selection mode and pop-up window anchor. See ShareControllerOptions

[[../qtcore/qsharedpointer.html|QSharedPointer]]<QtOhosExtras::ShareKit::QOhosSharedRecord> ShareKit::createFileRecord(const [[../qtcore/qfileinfo.html|QFileInfo]] &fileInfo)

Creates a shared "file" record with a given fileInfo. Shared record can be created with file (this function) or as a content record

See SharedRecord.uri

See also QtOhosExtras::ShareKit::createContentRecord() and ..

[[../qtcore/qsharedpointer.html|QSharedPointer]]<QtOhosExtras::ShareKit::QOhosSharedRecord> ShareKit::createUrlRecord(const [[../qtcore/qurl.html|QUrl]] &url)

Creates a shared record with a given url. See SharedRecord.content