QDocPreviewLive preview and linting for QDoc
documentation — the Markdown-preview experience, for How to useOpen a file, press You can also open the preview by clicking the Preview button, the same way you would open the Markdown preview:
You need neither the What it does
LintingEvery check is a rule with a level you can change, so one noisy check can be silenced without losing the rest. The rule id appears beside each entry in the Problems panel, and the markup is marked in the preview where the problem occurs. It reports:
Set a rule to Warnings your InstallationDownload the latest SetupAfter installing, set these settings:
|
| Setting | Default | Meaning |
|---|---|---|
qdocPreview.roots |
[] |
Folders where the extension is active. Empty means any folder with a .qdocconf. |
qdocPreview.qtInstallDocs |
"" |
Value for $QT_INSTALL_DOCS. |
qdocPreview.configVars |
the build's variables, empty | Values for .qdocconf variables the build supplies, such as QT_VERSION. |
qdocPreview.diagnostics.enabled |
true |
Report problems at all. |
qdocPreview.diagnostics.rules |
{} |
Level per rule: off, hint, info, warning, error. 25 rules; see the setting's description. |
qdocPreview.diagnostics.suppressedByConfig |
"downgrade" |
What to do with warnings the .qdocconf silences via spurious. |
qdocPreview.altText.display |
"caption" |
caption, hover, or hidden — how image descriptions are shown. |
qdocPreview.showUnsupported |
true |
Show placeholders for constructs the preview cannot resolve. |
qdocPreview.showTopicHeaders |
true |
Synthesize a page header from \class, \fn, … |
qdocPreview.includeInternal |
true |
Render \internal blocks. QDoc hides them without --showinternal. |
qdocPreview.scrollSync |
true |
Preview follows the cursor. |
qdocPreview.updateDelay |
300 |
Milliseconds of idle before re-rendering. |
qdocPreview.excludeGlobs |
node_modules, .git, build*, _build* |
Skipped when scanning for .qdocconf. |
qdocPreview.maxConfigFiles |
4000 |
Cap on .qdocconf files collected per scan. |
Image descriptions
qdocPreview.altText.display decides what a sighted reader sees. The alt attribute
is written in every mode, since that is what screen readers use:
| Mode | Effect |
|---|---|
caption |
A visible line under the image. Default, so a missing description is obvious while writing. |
hover |
A tooltip only. |
hidden |
Nothing visible. |
An image with no description shows a no alt text marker and produces a warning.
QDoc's own check is opt-in per module via reportmissingalttextforimages, which most
Qt modules do not set — alt text is expected regardless, so the warning is not gated
on it. Silence it with "missing-alt-text": "off" in qdocPreview.diagnostics.rules.
This image shows how the image caption is rendered by default:

Commands
Every command is under the QDocPreview: prefix in the Command Palette.
| Command | Purpose |
|---|---|
| Open Preview to the Side | Beside the editor. Bound to Cmd+K V / Ctrl+K V |
| Open Preview | In the current column |
| Refresh Preview | Re-read configuration and re-render |
Rescan .qdocconf Files |
Rebuild the cached index |
| Show Configuration Used for This File | Which .qdocconf was chosen, and what it provided |
| Lint All QDoc Comments in Folder | Fill the Problems panel for a whole checkout |
Contributing
Bug reports and patches are welcome. CONTRIBUTING.md explains the code layout, how to run the tests, and how to package the extension — no dependencies and no build step, only Node.js.
