QgsPathResolver class

Resolves relative paths into absolute paths and vice versa.

Used for writing

Constructors, destructors, conversion operators

QgsPathResolver(const QString& baseFileName = QString()) explicit
Initialize path resolver with a base filename. Null filename means no conversion between relative/absolute path.

Public functions

auto readPath(const QString& filename) const -> QString
Turn filename read from the project file to an absolute path.
auto writePath(const QString& filename) const -> QString
Prepare a filename to save it to the project file.

Function documentation

QString QgsPathResolver::writePath(const QString& filename) const

Prepare a filename to save it to the project file.

Creates an absolute or relative path according to the project settings. Paths written to the project file should be prepared with this method.