Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_gui_kernel_qclipboard.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3#include <QClipboard>
4#include <QGuiApplication>
5#include <QMimeData>
6
8void wrapper() {
9QString newText;
12
13
16QString originalText = clipboard->text();
17// etc.
18clipboard->setText(newText);
20
21
25clipboard->setMimeData(data, mode);
27
28
29} // wrapper
30} // src_gui_kernel_qclipboard
The QClipboard class provides access to the window system clipboard.
Definition qclipboard.h:20
void setText(const QString &, Mode mode=Clipboard)
Copies text into the clipboard as plain text.
void setMimeData(QMimeData *data, Mode mode=Clipboard)
Sets the clipboard data to src.
QString text(Mode mode=Clipboard) const
Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any te...
Mode
\keyword clipboard mode
Definition qclipboard.h:27
static QClipboard * clipboard()
Returns the object for interacting with the clipboard.
\inmodule QtCore
Definition qmimedata.h:16
void setImageData(const QVariant &image)
Sets the data in the object to the given image.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Definition image.cpp:4
GLenum mode
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data