52 void MyWidget::dragEnterEvent(QDragEnterEvent *
event)
54 if (
event->mimeData()->hasUrls())
55 event->acceptProposedAction();
58 void MyWidget::dropEvent(QDropEvent *
event)
60 if (
event->mimeData()->hasUrls()) {
78 void MyWidget::dropEvent(QDropEvent *
event)
80 const MyMimeData *myData =
81 qobject_cast<const MyMimeData *>(
event->mimeData());
101 if (
event->mimeData()->hasImage()) {
114 if (
event->mimeData()->hasColor()) {
The QByteArray class provides an array of bytes.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QMimeData class provides a container for data that records information about its MIME type.
void setData(const QString &mimetype, const QByteArray &data)
void setImageData(const QVariant &image)
The QUrl class provides a convenient interface for working with URLs.
QList< QWindow * > windows
EGLOutputLayerEXT EGLint EGLAttrib value
GLint GLint GLint GLint GLint x
[0]
QUrl url("http://www.example.com/List of holidays.xml")
[0]
application x qt windows mime
[2]