Skip to content

PythonQt.QtGui.QClipboard · declarations 001

Back to PythonQt.QtGui.QClipboard

FindBuffer instance-attribute

FindBuffer: Any

LastMode instance-attribute

LastMode: Any

Mode instance-attribute

Mode: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

changed

changed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QClipboard.changed; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QClipboard::changed(QClipboard::Mode mode)

This signal is emitted when the data for the given clipboard mode is changed.

This function was introduced in Qt 4.2.

See also dataChanged(), selectionChanged(), and findBufferChanged().

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#changed

clear

clear(mode: Any) -> None

X.clear(mode)

Supplemental documentation: Qt 5 reference:

void QClipboard::clear(QClipboard::Mode mode \= Clipboard)

Clear the clipboard contents.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, this function clears the global clipboard contents. If mode is QClipboard::Selection, this function clears the global mouse selection contents. If mode is QClipboard::FindBuffer, this function clears the search string buffer.

See also QClipboard::Mode and supportsSelection().

Upstream PySide2 reference signatures (binding differences may apply):

clear(self, mode: PySide2.QtGui.QClipboard.Mode=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#clear

dataChanged

dataChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QClipboard.dataChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QClipboard::dataChanged()

This signal is emitted when the clipboard data is changed.

On macOS and with Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated.

See also findBufferChanged(), selectionChanged(), and changed().

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#dataChanged

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QClipboard.destroyed; argument details are not documented.

findBufferChanged

findBufferChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QClipboard.findBufferChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QClipboard::findBufferChanged()

This signal is emitted when the find buffer is changed. This only applies to macOS.

With Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated.

This function was introduced in Qt 4.2.

See also dataChanged(), selectionChanged(), and changed().

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#findBufferChanged

image

image(mode: Any) -> Any

X.image(mode) -> PythonQt.QtGui.QImage

Supplemental documentation: Qt 5 reference:

QImage QClipboard::image(QClipboard::Mode mode \= Clipboard) const

Returns the clipboard image, or returns a null image if the clipboard does not contain an image or if it contains an image in an unsupported image format.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the image is retrieved from the global clipboard. If mode is QClipboard::Selection, the image is retrieved from the global mouse selection.

See also setImage(), pixmap(), mimeData(), and QImage::isNull().

Upstream PySide2 reference signatures (binding differences may apply):

image(self, mode: PySide2.QtGui.QClipboard.Mode=...) -> PySide2.QtGui.QImage

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#image

mimeData

mimeData(mode: Any) -> Any

X.mimeData(mode) -> PythonQt.QtCore.QMimeData

Supplemental documentation: Qt 5 reference:

const QMimeData *QClipboard::mimeData(QClipboard::Mode mode \= Clipboard) const

Returns a pointer to a QMimeData representation of the current clipboard data (can be nullptr if the given mode is not supported by the platform).

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the data is retrieved from the global clipboard. If mode is QClipboard::Selection, the data is retrieved from the global mouse selection. If mode is QClipboard::FindBuffer, the data is retrieved from the search string buffer.

The text(), image(), and pixmap() functions are simpler wrappers for retrieving text, image, and pixmap data.

Note: The pointer returned might become invalidated when the contents of the clipboard changes; either by calling one of the setter functions or externally by the system clipboard changing.

See also setMimeData().

Upstream PySide2 reference signatures (binding differences may apply):

mimeData(self, mode: PySide2.QtGui.QClipboard.Mode=...) -> PySide2.QtCore.QMimeData

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#mimeData

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QClipboard.objectNameChanged; argument details are not documented.

ownsClipboard

ownsClipboard() -> bool

X.ownsClipboard() -> bool

Supplemental documentation: Qt 5 reference:

bool QClipboard::ownsClipboard() const

Returns true if this clipboard object owns the clipboard data; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

ownsClipboard(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#ownsClipboard

ownsFindBuffer

ownsFindBuffer() -> bool

X.ownsFindBuffer() -> bool

Supplemental documentation: Qt 5 reference:

bool QClipboard::ownsFindBuffer() const

Returns true if this clipboard object owns the find buffer data; otherwise returns false.

This function was introduced in Qt 4.2.

Upstream PySide2 reference signatures (binding differences may apply):

ownsFindBuffer(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#ownsFindBuffer

ownsSelection

ownsSelection() -> bool

X.ownsSelection() -> bool

Supplemental documentation: Qt 5 reference:

bool QClipboard::ownsSelection() const

Returns true if this clipboard object owns the mouse selection data; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

ownsSelection(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#ownsSelection

pixmap

pixmap(mode: Any) -> Any

X.pixmap(mode) -> PythonQt.QtGui.QPixmap

Supplemental documentation: Qt 5 reference:

QPixmap QClipboard::pixmap(QClipboard::Mode mode \= Clipboard) const

Returns the clipboard pixmap, or null if the clipboard does not contain a pixmap. Note that this can lose information. For example, if the image is 24-bit and the display is 8-bit, the result is converted to 8 bits, and if the image has an alpha channel, the result just has a mask.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the pixmap is retrieved from the global clipboard. If mode is QClipboard::Selection, the pixmap is retrieved from the global mouse selection.

See also setPixmap(), image(), mimeData(), and QPixmap::convertFromImage().

Upstream PySide2 reference signatures (binding differences may apply):

pixmap(self, mode: PySide2.QtGui.QClipboard.Mode=...) -> PySide2.QtGui.QPixmap

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#pixmap

selectionChanged

selectionChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QClipboard.selectionChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QClipboard::selectionChanged()

This signal is emitted when the selection is changed. This only applies to windowing systems that support selections, e.g. X11. Windows and macOS don't support selections.

See also dataChanged(), findBufferChanged(), and changed().

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#selectionChanged

setImage

setImage(arg__1: Any, mode: Any) -> None

X.setImage(arg__1, mode)

Supplemental documentation: Qt 5 reference:

void QClipboard::setImage(const QImage \&image, QClipboard::Mode mode \= Clipboard)

Copies the image into the clipboard.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the image is stored in the global clipboard. If mode is QClipboard::Selection, the data is stored in the global mouse selection.

This is shorthand for:

QMimeData *data = new QMimeData;
data->setImageData(image);
clipboard->setMimeData(data, mode);

See also image(), setPixmap(), and setMimeData().

Upstream PySide2 reference signatures (binding differences may apply):

setImage(self, arg__1: PySide2.QtGui.QImage, mode: PySide2.QtGui.QClipboard.Mode=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#setImage

setMimeData

setMimeData(data: Any, mode: Any) -> None

X.setMimeData(data, mode)

Supplemental documentation: Qt 5 reference:

void QClipboard::setMimeData(QMimeData *src, QClipboard::Mode mode \= Clipboard)

Sets the clipboard data to src. Ownership of the data is transferred to the clipboard. If you want to remove the data either call clear() or call setMimeData() again with new data.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the data is stored in the global clipboard. If mode is QClipboard::Selection, the data is stored in the global mouse selection. If mode is QClipboard::FindBuffer, the data is stored in the search string buffer.

The setText(), setImage() and setPixmap() functions are simpler wrappers for setting text, image and pixmap data respectively.

See also mimeData().

Upstream PySide2 reference signatures (binding differences may apply):

setMimeData(self, data: PySide2.QtCore.QMimeData, mode: PySide2.QtGui.QClipboard.Mode=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#setMimeData

setPixmap

setPixmap(arg__1: Any, mode: Any) -> None

X.setPixmap(arg__1, mode)

Supplemental documentation: Qt 5 reference:

void QClipboard::setPixmap(const QPixmap \&pixmap, QClipboard::Mode mode \= Clipboard)

Copies pixmap into the clipboard. Note that this is slower than setImage() because it needs to convert the QPixmap to a QImage first.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the pixmap is stored in the global clipboard. If mode is QClipboard::Selection, the pixmap is stored in the global mouse selection.

See also pixmap(), setImage(), and setMimeData().

Upstream PySide2 reference signatures (binding differences may apply):

setPixmap(self, arg__1: PySide2.QtGui.QPixmap, mode: PySide2.QtGui.QClipboard.Mode=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#setPixmap

setText

setText(arg__1: str, mode: Any) -> None

X.setText(arg__1, mode)

Supplemental documentation: Qt 5 reference:

void QClipboard::setText(const QString \&text, QClipboard::Mode mode \= Clipboard)

Copies text into the clipboard as plain text.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the text is stored in the global clipboard. If mode is QClipboard::Selection, the text is stored in the global mouse selection. If mode is QClipboard::FindBuffer, the text is stored in the search string buffer.

See also text() and setMimeData().

Upstream PySide2 reference signatures (binding differences may apply):

setText(self, arg__1: str, mode: PySide2.QtGui.QClipboard.Mode=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#setText

supportsFindBuffer

supportsFindBuffer() -> bool

X.supportsFindBuffer() -> bool

Supplemental documentation: Qt 5 reference:

bool QClipboard::supportsFindBuffer() const

Returns true if the clipboard supports a separate search buffer; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

supportsFindBuffer(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#supportsFindBuffer

supportsSelection

supportsSelection() -> bool

X.supportsSelection() -> bool

Supplemental documentation: Qt 5 reference:

bool QClipboard::supportsSelection() const

Returns true if the clipboard supports mouse selection; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

supportsSelection(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#supportsSelection

text

text(subtype: Any, mode: Any) -> str

X.text(subtype, mode) -> str

Supplemental documentation: Qt 5 reference:

QString QClipboard::text(QClipboard::Mode mode \= Clipboard) const

Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any text.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the text is retrieved from the global clipboard. If mode is QClipboard::Selection, the text is retrieved from the global mouse selection. If mode is QClipboard::FindBuffer, the text is retrieved from the search string buffer.

See also setText() and mimeData().

QString QClipboard::text(QString \&subtype, QClipboard::Mode mode \= Clipboard) const

This is an overloaded function.

Returns the clipboard text in subtype subtype, or an empty string if the clipboard does not contain any text. If subtype is null, any subtype is acceptable, and subtype is set to the chosen subtype.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the text is retrieved from the global clipboard. If mode is QClipboard::Selection, the text is retrieved from the global mouse selection.

Common values for subtype are "plain" and "html".

Note that calling this function repeatedly, for instance from a key event handler, may be slow. In such cases, you should use the dataChanged() signal instead.

See also setText() and mimeData().

Upstream PySide2 reference signatures (binding differences may apply):

text(self, mode: PySide2.QtGui.QClipboard.Mode=...) -> str
text(self, subtype: str, mode: PySide2.QtGui.QClipboard.Mode=...) -> str

Source: https://doc.qt.io/archives/qt-5.15/qclipboard.html#text