我正在嘗試製作一款遊戲,並且爲播放器創建了一個類。該類繼承了「Entity」,它繼承了QGraphicsItem。Qt模糊錯誤
#ifndef PLAYER_H
#define PLAYER_H
#include "entity.h"
class Player : public Entity
{
public:
Player(QString, int, int, int position);
QRectF boundingRect() const;
void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget);
void move_north();
void move_south();
void move_west();
void move_east();
void start_moving();
void stop_moving();
void switch_step();
bool its_moving();
void change_pos(int);
private:
QPoint position;
bool is_moving;
private signals:
void Move();
};
#endif // PLAYER_H
,但我不斷收到錯誤「預期‘:’‘保護’之前」,在33行