qt get folder path code example Example: qt extract dir from path QDir d = QFileInfo(filePath).absoluteDir(); QString absolute=d.absolutePath();