@Sphinkie
Wow, I had not noticed there is such a namespace since I'm still mainly using 5.12.
If the constants are QColor objects as the doc says, then you should be able to use them directly like
@TheTrueGoofy said in Read and write QBrush (QPen, QFont) as XML:
Certainly this is also quite simple to implement, but I was hoping that there is a more elegant solution.
I think the only other way is to create feature request for QtGui, or implement a Qt patch yourself - to add a QBrush::toString() method (or QTextStream overload), with a corresponding QBrush::fromString().