diff options
Diffstat (limited to 'doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp')
-rw-r--r-- | doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp b/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp new file mode 100644 index 000000000..f06074db4 --- /dev/null +++ b/doc/codesnippets/doc/src/snippets/code/src_gui_kernel_qclipboard.cpp @@ -0,0 +1,13 @@ +//! [0] +clipboard = QApplication.clipboard() +originalText = clipboard.text() +... +clipboard.setText(newText) +//! [0] + + +//! [1] +data = QMimeData() +data.setImageData(image) +clipboard.setMimeData(data, mode) +//! [1] |