查看完整版本: [-- 在drawPixmap图片依附QRect循环出3个,现在是移动其中一个的问题 --]

QTCN开发网 -> Qt基础编程 -> 在drawPixmap图片依附QRect循环出3个,现在是移动其中一个的问题 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

爱到老 2021-04-01 14:53

在drawPixmap图片依附QRect循环出3个,现在是移动其中一个的问题

gamecarsRect = new QRect(0,50,50,110); for (int i=0;i<gamecars.size();i++)     {x=x+50;      gamecarsRect->moveLeft(x);      painter.drawPixmap(*gamecarsRect,*gamecars[i]);代码发多了行数,版本都变了,把主要的复制过来,说下问题思路吧。drawPixmap根据*gamecarsRect矩形的XY坐标打印了3张图片。我在鼠标事件里面
点击 gamecarsRect->moveBottom(300);需要是移动3张的其中一张,其他不动,现在是全动,求大侠给出个思路解决!!
  


查看完整版本: [-- 在drawPixmap图片依附QRect循环出3个,现在是移动其中一个的问题 --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled