Qt编译报error: expected ')' before '&' token GameController(QGraphicsScene &scene, QObject *parent = 0)

写qt程序的时候,在编译时报error: expected ')' before '&' token GameController(QGraphicsScene &scene, QObject *parent = 0),经仔细查阅资料,发现是报故位置的函数所在的声明(头)文件没有include包含进来。修改后,编译通过。前后如下二图:

Qt编译报error: expected ')' before '&' token GameController(QGraphicsScene &scene, QObject *parent = 0)_第1张图片

Qt编译报error: expected ')' before '&' token GameController(QGraphicsScene &scene, QObject *parent = 0)_第2张图片

你可能感兴趣的:(qt实战)