Amanda
19th November 2006, 03:23
Hi,
I am getting the following error with the style() method.
error: `drawItemText' has not been declared
Do I need to configure Qt 4 (on win32 platform) with an option to get the GUI style libraries to configure correctly (I believe that may be the problem)?
Thanks,
Amanda
Code excerpts:
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);
}
I am getting the following error with the style() method.
error: `drawItemText' has not been declared
Do I need to configure Qt 4 (on win32 platform) with an option to get the GUI style libraries to configure correctly (I believe that may be the problem)?
Thanks,
Amanda
Code excerpts:
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);
}