label
->setFrameStyle
(QFrame::Plain);
label->setBackgroundMode(Qt::FixedColor);
label
->setPaletteBackgroundColor
(QColor("red"));
label->setText("<table bgcolor=white border=0 cellspacing=0 cellpadding=0><tr><td>aaa<br>ccc<br>ddd</td><td>bbb</td></tr></table>");
label->show();
QLabel *label = new QLabel(0);
label->setFrameStyle(QFrame::Plain);
label->setBackgroundMode(Qt::FixedColor);
label->setPaletteBackgroundColor(QColor("red"));
label->setText("<table bgcolor=white border=0 cellspacing=0 cellpadding=0><tr><td>aaa<br>ccc<br>ddd</td><td>bbb</td></tr></table>");
label->show();
To copy to clipboard, switch view to plain text mode
and effect:

What can I do to avoid this red border above, under and on the right of the table?
I'd like to have a QLabel that consist ONLY the table - and nothing else (no margins).
(I've made red and white colors only to show you this margins)
Bookmarks