Qt 6.12 LTS is out! See what's new in the release
blog
Drag and Drop a directory
-
I'm accepting drops of type "text/uri-list"
In the code that handles the dropEvent, I can write:
QList<QUrl> urls = event->mimeData()->urls; for (int i = 0; i != urls.size(); ++i) { QString name = urls[i].toLocalFile(); }What is the recommended code to distinguish what "name" is (file or directory)?
Thanks
David -
QFileInfo :
bool isAbsolute() const
bool isBundle() const
bool isDir() const
bool isExecutable() const
bool isFile() const
bool isHidden() const
bool isNativePath() const
bool isReadable() const
bool isRelative() const
bool isRoot() const
bool isSymLink() const
bool isWritable() const