DragSink:
Filter:
Classes | GUI > Views

DragSink : DragView : TextField : TextViewBase : View : QObject : Object

A simple drag-and-drop receiver.
Source: DragView.sc
Subclasses: DragBoth, QDragSink

Description

DragSource, DragSink and DragBoth are a set of view classes intended as simple-to-use drag-and-drop sources and destinations. They are graphically represented as a simple rectangle, and their specialty is that they do not require the Cmd/Ctrl key to be held down to initiate dragging.

Akin to StaticText they can store arbitrary content in the -object variable, and display it using Object: -asString. You can set the displayed text separately using -string, and keep it independent of the content if you set -setBoth to false.

DragSink, specifically, accepts any dropped data and stores it into the -object variable, but allows no dragging.

See: View: Drag and drop for a general description of the drag and drop mechanism.

Class Methods

Inherited class methods

Instance Methods

.defaultCanReceiveDrag

Returns:

Always True.

.defaultReceiveDrag

Sets the -object to the current drag data.

Inherited instance methods

Examples