
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQ3ColorDrag class provides a drag and drop object for transferring colors between widgets.More...
| Header: | #include <Q3ColorDrag> |
| Inherits: | Q3StoredDrag |
| Q3ColorDrag(const QColor & col, QWidget * dragsource = 0, const char * name = 0) | |
| Q3ColorDrag(QWidget * dragsource = 0, const char * name = 0) | |
| void | setColor(const QColor & color) |
TheQ3ColorDrag class provides a drag and drop object for transferring colors between widgets.
This class provides a drag object which can be used to transfer data about colors for drag and drop and in the clipboard. For example, it is used inQColorDialog.
The color is set in the constructor but can be changed withsetColor().
For more information about drag and drop, see theQ3DragObject class and thedrag and drop documentation.
Constructs a color drag object with the givencol. Passesdragsource andname to theQ3StoredDrag constructor.
Constructs a color drag object with a white color. Passesdragsource andname to theQ3StoredDrag constructor.
[static]bool Q3ColorDrag::canDecode(QMimeSource * source)Returns true if the color drag object can decode the MIMEsource; otherwise returns false.
[static]bool Q3ColorDrag::decode(QMimeSource * source,QColor & color)Decodes the MIMEsource, and sets the decoded values to the givencolor. Returns true if the decoding is successful. Returns false if the size of the encoded data is not the expected size.
Sets thecolor of the color drag.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.