DataTransfer
from slint import DataTransferRepresents some form of type-indexed possibly-lazy data transfer.
Used for accessing the platform clipboard and drag-and-drop APIs.
Properties
Section titled “Properties”has_plaintext
Section titled “has_plaintext”has_plaintext: boolTrue if this DataTransfer advertises a plaintext representation.
has_image
Section titled “has_image”has_image: boolTrue if this DataTransfer advertises an image representation.
user_data
Section titled “user_data”Application-internal user data attached to this DataTransfer. Use this when the
drag-and-drop or clipboard operation stays inside the current Python application and you
want to avoid serializing to plaintext or an image.
Reading returns the Python object previously assigned, or None if none was set (or the
user data was set by a non-Python binding). Assigning None clears any previously attached
Python user data.
Methods
Section titled “Methods”set_plaintext
Section titled “set_plaintext”Sets the plaintext representation of this DataTransfer. Calling this again overwrites
the previous plaintext.
fetch_plaintext
Section titled “fetch_plaintext”Returns the plaintext representation of this DataTransfer, or None if no plaintext
is available.
set_image
Section titled “set_image”Sets the image representation of this DataTransfer. Calling this again overwrites the
previous image.
fetch_image
Section titled “fetch_image”Returns the image representation of this DataTransfer, or None if no image is
available.
© 2026 SixtyFPS GmbH