Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The Q3TextDrag class is a drag and drop object for transferring plain and Unicode text. More...
#include <Q3TextDrag>
This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information.
Inherits Q3DragObject.
The Q3TextDrag class is a drag and drop object for transferring plain and Unicode text.
Plain text is passed in a QString which may contain multiple lines (i.e. may contain newline characters). The drag target will receive the newlines according to the runtime environment, e.g. LF on Unix, and CRLF on Windows.
Qt provides no built-in mechanism for delivering only a single-line.
For more information about drag and drop, see the Q3DragObject class and the drag and drop documentation.
Constructs a text drag object with the given name, and sets its data to text. The dragSource is the widget that the drag operation started from.
Constructs a default text drag object with the given name. The dragSource is the widget that the drag operation started from.
Destroys the text drag object.
Returns true if the information in the MIME source can be decoded into a QString; otherwise returns false.
See also decode().
Attempts to decode the dropped information in the MIME source into the string given. Returns true if successful; otherwise returns false.
See also canDecode().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Attempts to decode the dropped information in the MIME source into the string given. Returns true if successful; otherwise returns false. If subtype is null, any text subtype is accepted; otherwise only the specified subtype is accepted.
See also canDecode().
Sets the MIME subtype of the text being dragged. The default subtype is "plain", so the default MIME type of the text is "text/plain". You might use this to declare that the text is "text/html" by calling setSubtype("html").
Sets the text to be dragged. You will need to call this if you did not pass the text during construction.
Copyright © 2005 Trolltech | Trademarks | Qt 4.1.0 |