Hi and welcome to devnet,

Try something like:

QUrl url("file:///Users/your_user/your_file.extension"); NSURL *nsUrl = url.toNSURL(); NSError *error = nil; NSData *bookmark = [nsUrl bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope includingResourceValuesForKeys:nil relativeToURL:nil error:&error]; qDebug() << "Error" << error; qDebug() << QByteArray::fromNSData(bookmark);

Hope it helps