I am getting the following error when trying to build my app in Qt Creator:
error (line 3): no matching function for call to ‘QGraphicsScene::QGraphicsScene()’
The source for this is simply (file name is gamscene.cpp):
#include "gamescene.h"
GameScene::GameScene() : QGraphicsScene(parent)
{
}
I have googled around and have seen some similar issues but I don’t really understand the answers given.
We’ve derived from the QGraphicsScene class like so
Notice the parent is a parameter passed to the constructor. The constructor implementation looks like: