5void MyWidget::dragEnterEvent(QDragEnterEvent *
event)
7 if (
event->mimeData()->hasUrls())
8 event->acceptProposedAction();
11void MyWidget::dropEvent(QDropEvent *
event)
13 if (
event->mimeData()->hasUrls()) {
31void MyWidget::dropEvent(QDropEvent *
event)
33 const MyMimeData *myData =
34 qobject_cast<const MyMimeData *>(
event->mimeData());
48application/
x-qt-windows-
mime;
value=
"FileGroupDescriptor"
49application/
x-qt-windows-
mime;
value=
"FileContents"
54if (
event->mimeData()->hasImage()) {
67if (
event->mimeData()->hasColor()) {
The QColor class provides colors based on RGB, HSV or CMYK values.
void setData(const QString &mimetype, const QByteArray &data)
Sets the data associated with the MIME type given by mimeType to the specified data.
void setImageData(const QVariant &image)
Sets the data in the object to the given image.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint GLint GLint GLint GLint x
[0]
QUrl url("example.com")
[constructor-url-reference]
application x qt windows mime
[2]