我有一个填充了QGraphicsRectItem元素(小矩形)的QVector,当用户单击它时,我需要删除一个矩形。Documents\my_game\myscene.cpp:24: error: no matching function for call to 'myscene::removeItem(QVector<QGraphicsRectItem代码如下: #incl
My work Environment:QT5.8 MSVC2015 64位,QT GraphicsView,QGraphicsRectItem,Windows 7 64位。但是当我将QGraphicsRectItem添加到场景中时,它无法调用它的画图方法。我的班级等级: class mySquare : public QObject, public QGraphicsRectItemclass Scene : public QGraphicsSce
我有场景(使用QGraphicsScene),我用方块填充那个场景(使用QGraphicsRectItem)。我想让每一个正方形颜色变成黑色,因为我移动鼠标在广场上按下鼠标按钮。scene->addItem(squares[i][j]);square.h .h(编辑)#define SQUARE_H#include <QGraphicsView>
class Square : public QG