class StatusLabel
: public QLabel{ Q_OBJECT
public:
StatusLabel
(QWidget *parent
=0,
const char *name
=0);
protected:
};
{
buffer.fill(paletteBackgroundColor());
QRect cr
= contentsRect
();
style().drawItemText(&p, cr, alignment(), colorGroup(), isEnabled(), pixmap(), text());
bitBlt(this, 0, 0, &buffer);
}
class StatusLabel : public QLabel
{ Q_OBJECT
public:
StatusLabel(QWidget *parent=0, const char *name=0);
protected:
virtual void paintEvent(QPaintEvent *);
};
void StatusLabel:: paintEvent(QPaintEvent *)
{
QPixmap buffer(size());
buffer.fill(paletteBackgroundColor());
QPainter p(&buffer);
QRect cr = contentsRect();
style().drawItemText(&p, cr, alignment(), colorGroup(), isEnabled(), pixmap(), text());
bitBlt(this, 0, 0, &buffer);
}
To copy to clipboard, switch view to plain text mode
Bookmarks