Choose page loading first
loadHTML takes a string; loadFile loads a file. Lessons such as settings embed HTML/CSS in a generated header, so those pages are not read separately at runtime. File-based loading requires shipping the pages and external resources together.
Edit an embedded page
In the settings project, edit the source files rather than the generated output.
- Edit settings.zh.html / settings.en.html or app.css.
- Rebuild so CMake reads the files and refreshes generated_page.h.
- Close the old window and run the new build/Release/settings_lab.exe.
- Check --english as well; do not edit the generated header in build/.
Keep resource locations predictable
Define folders for images, fonts, pages and extensions. Resolve paths from an application-known root rather than a terminal’s working directory. Test relative paths in a minimal file-loaded page; an embedded string has no page-file folder you can assume.
Missing resources
Use the symptom to narrow the cause before editing.
| Symptom | Check and action |
|---|---|
| Blank image | Check the delivered file, path, format and element dimensions. |
| Different typography | Check fonts, files, weights and fallback on the target machine. |
| Works only in the IDE | Launch from another working directory and remove repository-path or developer-PATH dependencies. |
Verify the actual delivery
Copy resources and runtime to a fresh folder and check language, icons, fonts, images and optional extensions. Store user data separately from embedded installation assets.
Something unclear?
Report an issue on this page →