Clipboard QML Type
Wrapper for QClipboard. More...
- Import Statement: import org.kde.kquickcontrols.addons
Detailed Description
Offers a simple wrapper to interact with QClipboard from QtQuick.
import QtQuick
import org.kde.kquickcontrolsaddons as KQuickControlsAddons
Text {
text: "lorem ipsum"
KQuickControlsAddons.Clipboard { id: clipboard }
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: clipboard.content = parent.text
}
}
Property Documentation
content : var
Provides the contents currently in the clipboard and lets modify them.
formats : list<string>
Figure out the nature of the contents in the clipboard as mimetype strings.
mode : QClipboard::Mode
Controls the state this object will be monitoring and extracting its contents from.
Signal Documentation
contentChanged()
Note: The corresponding handler is
onContentChanged.
modeChanged(QClipboard::Mode mode)
Note: The corresponding handler is
onModeChanged.
Method Documentation
void clear()
See also QClipboard::clear()
variant contentFormat(string format)
Returns Output based on the mimetype.
This may be a list of URLs, text, image data, or use QMimeData::data.
format mimetype string