请教各位大侠,我定义了一个类MyItem,继承自QGraphicsItem,在void MyItem::advance(int phrase) 中实现 rotate呢?
void MyItem::advance(int phrase) { //第一阶段不进行处理 if(!phrase) return; //图形项 向不同方向随机移动 int value = qrand()%100;
if(value <25){ //rotate(45); //这句总是编译不过去,提示我未声明 moveBy(qrand()%10,qrand()%10); }}我使用的环境是 qt 5.2.1。