I'm having a very serious issue with QT Creator. I can no longer use pointers to other classes and autocompletion doesn't work in my primary class. It feels like something has become corrupt, but all my code was working with a few pointers existing, then all at once none of them worked and errored out.
Line 21: InkPuppet *pointerToPuppet;
errors: x:\development\inkpuppet\newdialog.h:21: error: C2143: syntax error : missing ';' before '*'
and x:\development\inkpuppet\newdialog.h:21: error: C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Here is my .pro file:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = InkPuppet
TEMPLATE = app
SOURCES += main.cpp\
inkpuppet.cpp \
aboutdialog.cpp \
inkspot.cpp \
newdialog.cpp
HEADERS += inkpuppet.h \
aboutdialog.h \
inkspot.h \
newdialog.h
FORMS += inkpuppet.ui \
aboutdialog.ui \
newdialog.ui
OTHER_FILES += \
InkPuppet.pro.user
RESOURCES += \
resources.qrc
Here is my default header. inkpuppet.h
#ifndef INKPUPPET_H
#define INKPUPPET_H
#include "inkspot.h"
#include "ui_inkpuppet.h"
#include <QMainWindow>
#include <QWidget>
namespace Ui {
class InkPuppet;
}
class InkPuppet : public QMainWindow
{
Q_OBJECT
public:
explicit InkPuppet(QWidget *parent = 0);
~InkPuppet();
Ui::InkPuppet *ui;
private slots:
void setMinimum(int value);
void setMaximum(int value);
void actionNew();
void actionAbout();
void testButton();
};
#endif // INKPUPPET_H
newdialog.h
#ifndef NEWDIALOG_H
#define NEWDIALOG_H
#include "inkspot.h"
#include "inkpuppet.h"
#include "ui_inkpuppet.h"
#include <QDialog>
namespace Ui {
class NewDialog;
}
class NewDialog : public QDialog
{
Q_OBJECT
public:
explicit NewDialog(QWidget *parent = 0);
~NewDialog();
InkPuppet *pointerToPuppet;
private:
Ui::NewDialog *ui;
private slots:
void createNew();
};
#endif // NEWDIALOG_H