Issue Regaurding QBrush
-
hi,can some one please tell me i just want my QGraphicsRectItems background blue color and top of that one i want the "BDiagPattern".I tried with this code but i am getting only pattern inside the rectitem i want color also ...plese tell me how to do it?
@
QBrush brush;
brush.setStyle(Qt::BDiagPattern);
QMatrix myMatrix(99,0,99,0,0,0);
brush.setMatrix(myMatrix);
foreach(QGraphicsItem *item ,Parentrect->childItems())
{
qgraphicsitem_cast <QGraphicsRectItem * >(item)->setBrush (Qt::blue));
qgraphicsitem_cast <QGraphicsRectItem * >(item)->setBrush (brush);
}
@