Classes | GUI > Views

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

A simple drag-and-drop source and receiver
Source: DragView.sc
Subclasses: QDragBoth


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.

DragBoth, specifically, accepts any dropped data and stores it into the -object variable, as well as gives that variable as data for dragging.

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

Class Methods

Inherited class methods

Instance Methods



The -object.


From superclass: DragSink


Always True.


From superclass: DragSink

Sets the -object to the current drag data.

Inherited instance methods