Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.11
-
None
Description
Hi Team,
I am trying to drag n drop the mail item from outlook to my local QT application. Drag n drop of .eml extension file is working but the application is not able to detect the mail item when I drag and drop the mail directly from Outlook application installed in MAC Also, I want to fetch the mail body and attachment from the drag n drop event. Please help me with this.
Attached below is my code snippet:
void DropArea::dropEvent(QDropEvent *event) { const QMimeData *mimeData = event->mimeData(); QList<QByteArray> bytearray=mimeData->dynamicPropertyNames(); foreach(QByteArray by,bytearray){ qDebug()<<"bytearrauy"<<by; } if (mimeData->hasImage()) { setPixmap(qvariant_cast<QPixmap>(mimeData->imageData())); } else if (mimeData->hasHtml()) { setText("has html"+mimeData->html()); setTextFormat(Qt::RichText); } else if (mimeData->hasUrls()) { QList<QUrl> urlList = mimeData->urls(); QString text; for (int i = 0; i < urlList.size() && i < 32; ++i) text += urlList.at(i).path() + QLatin1Char('\n'); setText("hasurl"+text); } else if(mimeData->hasFormat("message/rfc822")){ setText(tr("msg droped")); }else { setText(tr("Cannot display data")); } setBackgroundRole(QPalette::Dark); event->acceptProposedAction(); }