nodeguy/website/docs/api/QClipboard.md
Atul R eca218ac79
Adds new doc site (#124)
* Adds base template for new docs site

* Adds Apis to docs

* add some css from rn

* Fix right side sidebar functionality

* Basic docs

* adds old docs

* Cleans up unnecessary files

* Chane links

* Adds docusaurus v2

* Styling fixes

* adds wip and new assets

* adds code image

* Add FAQ link

* Adds analytics

* adds cname

* cleanup blogs
2019-09-29 20:14:35 +02:00

1.9 KiB

sidebar_label title
QClipboard QClipboard

The QClipboard class provides access to the window system clipboard.

This class is a JS wrapper around Qt's QClipboard class

QClipboard inherits from Component

Example

const {
  QClipboard,
  QClipboardMode,
  QApplication
} = require("@nodegui/nodegui");

const clipboard = QApplication.clipboard();
const text = clipboard.text(QClipboardMode.Clipboard);

Static Methods

QClipboard can access all the static methods defined in Component

Instance Properties

QClipboard can access all the instance properties defined in Component

Instance Methods

QClipboard can access all the instance methods defined in Component. Additionally it has:

clipboard.clear(mode)

Clear the clipboard contents. It calls the native method QClipboard: clear.

clipboard.setText(text, mode)

Copies text into the clipboard as plain text. It calls the native method QClipboard: setText.

clipboard.text(mode)

Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any text. It calls the native method QClipboard: text.