- // draw the text on a rect with a arc appended
- QPainterPath path;
- path.moveTo(txtBounding.bottomRight());
- path.arcTo(txtBounding.right() - txtBounding.height() - 2, txtBounding.top() - txtBounding.height(), txtBounding.height() * 2, txtBounding.height() * 2, 270, 90);
- path.lineTo(txtBounding.topLeft());
- path.lineTo(txtBounding.bottomLeft());
- painter->fillPath(path, m_pen.color());
+ painter->setBrush(QBrush(m_pen.color()));
+ painter->drawRoundedRect(txtBounding.adjusted(-5, -5, 2, 1), 3, 3);