QSimpleRichText *doc = new QSimpleRichText( text(), font() );doc->setWidth(cr.width()-4);doc->draw(painter, 1, 2, cr, cg, 0);