We can add Layer Notes to every Layer in QGIS. Where is this info stored in QGIS?
1 Answer
The notes are saved in the QGIS project file (.qgz or .qgs) per layer and if you save a layer file (.qlr) for a layer with notes, the notes will also be saved to the .qlr file.
There's some information about the file formats in the documentation, though not specifically about layer notes.
If you open a .qgs (unzip a .qgz) or .qlr in a text editor (they are XML) you can find the <userNotes>
element which contains the notes in encoded HTML format, e.g.
<userNotes value="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Liberation Sans'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Note todo list</p></body></html>"/>