All classes of the Qwt plot framework use QwtText instead of QString.

Beside the option of using different text engines ( pseudo-HTML, MathML ) each instance of QwtText has its individual attributes: font, pen and an optional background are among them.

But your second posting doesn't explain why you need the layout code of the first posting ?

Uwe