I have a relatively simple class that contains a layout with a few widgets (labels, lineEdits, pushButtons) that gets displayed as a card. It all works fine until I try to add signals and slots. The header file, below, compiles fine with the sections commented-out as shown.
#include <QString>
#include <QObject>
#include <QWidget>
class KMLFile //: public QObject
{
//Q_OBJECT
public:
KMLFile();
~KMLFile();
QString m_originalFilename;
QString m_originalPath;
QString m_proposedFilename;
QString m_propsoedPath;
QString m_coords;
QWidget* trackWidget;
void populate(QString originalFilename, QString originalPath, QString proposedFilename, QString coords);
QString getCoords();
int getLength();
//public slots:
//void changeFilename();
};
When those bits of code are left in, I get the following error:
"C:...\qlist.h:425: error: C2280: 'KMLFile::KMLFile(const KMLFile &)': attempting to reference a deleted function
I am using Qt5.3 and Qt Creator. I have tried cleaning, running qmake and deleting the build folder to no avail. I'm stumped!
Grateful for any insight into how to fix this so that I can progress.