7void MyWidget::dragEnterEvent(QDragEnterEvent *
event)
9 if (
event->mimeData()->hasUrls())
10 event->acceptProposedAction();
13void MyWidget::dropEvent(QDropEvent *
event)
15 if (
event->mimeData()->hasUrls()) {
33void MyWidget::dropEvent(QDropEvent *
event)
35 const MyMimeData *myData =
36 qobject_cast<const MyMimeData *>(
event->mimeData());
50application/
x-qt-windows-
mime;
value=
"FileGroupDescriptor"
51application/
x-qt-windows-
mime;
value=
"FileContents"
56if (
event->mimeData()->hasImage()) {
69if (
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]