PDA

View Full Version : background color for QGraphicsWidget



QAir
16th July 2009, 14:18
Hello all,
I'm trying the following to set background color for a QGrahpicsWidget object



QGrahpicsWidget* w = new QGrahpicsWidget();
QBrush brush;
QPalette palette;
palette = w->palette();
brush.setColor(Qt::blue);
palette.setBrush(QPalette::Active, QPalette::Background, brush);
w->setPalette(palette);


but it doesn't work :(
any one has an idea???
thx to much

jpn
16th July 2009, 14:52
I'm afraid this functionality is not supported by QGraphicsWidget. You could file a suggestion to add "autoFillBackground" property like QWidget has.