DragSource:
Filter:
Classes | GUI > Views

DragSource : DragView : TextField : TextViewBase : View : QObject : Object

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

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.

DragSource, specifically, gives the -object variable as the data for dragging, but accepts no drop.

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

Class Methods

Inherited class methods

Instance Methods

.defaultGetDrag

Returns:

The -object.

Inherited instance methods

Examples