'Call to implicitly-deleted copy constructor' when attempting to implement class inheritance
Solved
General and Desktop
-
Hi,
I have a generic
Worksheet
class, and am trying to create a new inherited class calledLocalWorksheet
. Here is the stripped out source code that I am using.localworksheet.h:
#include <worksheet.h> class LocalWorksheet : public Worksheet { Q_OBJECT public: LocalWorksheet(const QString &title); };
localworksheet.cpp:
#include "localworksheet.h" LocalWorksheet::LocalWorksheet(const QString &title) : Worksheet(title) { }
The error I'm getting is this:
LocalWorksheet w = LocalWorksheet(title); ^ ~~~~~~~~~~~~~~~~~~~~~
What am I doing wrong?