在程序中看到这样一句
painter->drawPixmap(boundingRect().topLeft(),pix_up);
boundingRect()和topLeft()直接用点连接是什么意思啊?
还有就是QRectF()中的四个参数是坐标,大小的意思么?问什么要写成如下的形式啊?
boundingRect() const
{
qreal adjust = 2;
return QRectF(-pix_up.width()/2-adjust,-pix_up.height()/2-adjust,
pix_up.width()+adjust*2,pix_up.height()+2*adjust);
}
我是菜鸟,麻烦高手写详细点,小弟跪先拜了~~~谢谢啦~