[Qt-interest] qDebug() << this->palette() not working
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Mon Jun 15 09:46:03 CEST 2009
Did you include <QDebug>
If so, Im not sure TT has created a stream operator for QPalettePachinni's
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Neel Basu
Sent: Monday, June 15, 2009 12:21 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] qDebug() << this->palette() not working
Here goes my Code
void Widget::paintEvent(QPaintEvent*){
QPainter painter(this);
painter.translate(width() / 2, height() / 2);
painter.drawLine(0, 0, width(), height());
QPalette p = this->palette();
qDebug() << this->palette();
qDrawShadePanel(&painter, QRect(50, 50, 50, 50), p);
}
I get the Following error message from the above code
error: no match for ‘operator<<’ in ‘qDebug()() << ((Widget*)this)-
>Widget::<anonymous>.QWidget::palette()’
But If I comment out the qDebug() line no Compilation error occurs.
and qDrawShadePanel takes that p as its QPalette argument.
Neel
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list