@jsulm said in Storing QTextCharFormat and QColor to text file?:
QTextStream & operator<<(const QTextCharFormat&)
Hi, I have searched around how to write overloaded function for the operator, but I have not seen any example on the syntax you're using.
I have declared QTextStream & operator<<(const QTextCharFormat&) in the class' header file, and in the source file, it should be something like this?
QTextStream &SettingsDialog::operator<<(const QTextCharFormat &b) { stream << "font: " << b.font().toString() << " font-family: " << b.fontFamily(); return stream; }But I don't know where do I pass in the stream in the implementation.