hello friends

this question would seem simple but i am needing help.

i have to add a QCanvasEllipse to my QHBoxlayout.but it doesnt work
QBoxlayout *toplayout=new QHBoxLayout(this);
QCanvas *c=new QCanvas(100,100);
QCanvasView *cv=new QCanvasView(c);

QCanvasEllipse *elli=new QCanvasEllipse(50,50,.......,c);
elli->setBrush(Qt::setCyan);
toplayout->addWidget(cv);//can i do this.....

a)how should i add the canvas object in my Qlayout...
b)if not i need an ellipse to show the state of the object red n green...
but making an ellipse using a QPainter object .i cannot add a Qpainter object in Qlayout

Qpainter *p;
toplayout->addWidget(p);//can i do this.....

c)how do i add a nonrectangular widget in layout.

sooner rply
with regards
Amrita