Hi,
people from the other post say: use the QTextObjectInterface and i have try it. I can paint the RadioButton but there is without any function. How i get the button working e.g. checked with a mouseclick?
Thats my try:
{
option.rect = rect.toRect();
option.
state = QStyle::State_On;
}
void SvgTextObject::drawObject(QPainter *painter, const QRectF &rect,
QTextDocument * /*doc*/, int /*posInDocument*/,
const QTextFormat &format)
{
QStyleOptionButton option;
option.rect = rect.toRect();
option.state = QStyle::State_On;
QApplication::style()->drawControl(QStyle::CE_RadioButton, &option, painter);
}
To copy to clipboard, switch view to plain text mode
and the RadioButton looks deactivated.
Bookmarks