What about:
~~~html
<html>
  <head>
    <style>
        body {
            background-color: $BGCLR$;
            $FONT$
        }
    </style>
  </head>
  <body>
    Hello, world!
  </body>
</html>
~~~

and:

~~~c++
QString readTextFile(const QString& fn, const QHash<QString,QString>& repMap) {
    QString s;
    QFile f(fn);
    if (fn.open(QFile::ReadOnly)) {
        s = fn.readAll();
        foreach (QString macro, repMap.keys()) {
            s.replace(QChar(L'$') % macro % QChar(L'$'), repMap[macro]);
        }
    }
    return s;
}

void update() {
    QHash<QString, QString> repMap;
    repMap.insert("FONT", Config::defaultFontCSS());
    repMap.insert("BGCLR", "navy");
    setHTML(readTextFile(":/whatever/test.html", repMap));
}
~~~