<pre void MyQgraphicsObject::paint(QPainter *painter, ) { QRectF rec(0,0,50,60); QPixmap pi(":picture/im/super.jpg"); pi=pi.scaled(50,60); painter->setBrush(QBrush(pi)); painter->setPen(Qt::NoPen); painter->drawRoundedRect(rec,10,10); } //////////////////// QPixmap a(":picture/im/cloud.jpg"); scene->addPixmap(a); scene->setbackground(Qt::blue);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)