Click to See Complete Forum and Search --> : drawing on frame


qtlearner
April 22nd, 2006, 03:34 AM
how can I draw something on frame in qt ? no slot is allowable but adjustsize.

Thanks
-qtlearner

qtlearner
April 22nd, 2006, 03:48 AM
I am new to qt, I'd like to animate an object within the frame which may be easier for controls than leavin it alone in the whole form.
I guess I misunderstand the meaning of "frame" in qt to that in net? Anyone please ?

Also the below codesnip gives me a segmentation fault.
void MovingArea::paintEvent(QPaintEvent*){ //MovingArea is the formname
// MovingArea->setEnabled(false);
QPainter *p;
QBrush b(Qt::blue);

p->begin(this)
p->setPen(Qt::red);
p->setBrush(b);
p->drawRoundRect(10,17,150,10,20,20);
}