Fix: allow the drap&drop of a collection of files, and open all of them...

... instead of opening only the first one.
This commit is contained in:
Laurent Rineau 2012-09-27 13:29:40 +00:00
parent fc95783370
commit e3cb421cd2
1 changed files with 4 additions and 2 deletions

View File

@ -91,8 +91,10 @@ DemosMainWindow::dragEnterEvent(QDragEnterEvent *event)
void void
DemosMainWindow::dropEvent(QDropEvent *event) DemosMainWindow::dropEvent(QDropEvent *event)
{ {
QString filename = event->mimeData()->urls().at(0).toLocalFile(); Q_FOREACH(QUrl url, event->mimeData()->urls()) {
this->open(filename); QString filename = url.toLocalFile();
this->open(filename);
}
event->acceptProposedAction(); event->acceptProposedAction();
} }