How to get a filepath via QFileSystemModel? Selecting via selection model returns just file name, or drive name.
Note, that just file name isn't enough. Whole filepath is needed.
On qt website: http://doc.qt.io/qt-5/qfilesystemmodel.html
QString QFileSystemModel::filePath ( const QModelIndex & index ) const
Returns the path of the item stored in the model under the index given.
I dont know if this answers your question, else you can give us some code about what you tried / are trying to reach.
您可以使用类似QFileSystemModel :: filePath(index)的方法来完成此操作。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.