I have the following code in file mainwindow.h:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "logindialog.h"
namespace Ui {
class MainWindow;
}
{
Q_OBJECT
private:
Ui::MainWindow *ui;
LoginDialog *logindialog;
public:
explicit MainWindow
(QWidget *parent
= 0);
~MainWindow();
private slots:
void ALogin_Clicked();
void LoginDialog_Destroyed();
};
#endif // MAINWINDOW_H
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "logindialog.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
private:
Ui::MainWindow *ui;
LoginDialog *logindialog;
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void ALogin_Clicked();
void LoginDialog_Destroyed();
};
#endif // MAINWINDOW_H
To copy to clipboard, switch view to plain text mode
Other related files:
logindialog.cpp
logindialog.h
mainwindow.cpp
Everything works fine, until I put ANY changes into logindialog.cpp file. When I do, I get the following error in line 17:
c:\users\mati\komunikator_klient_da_ze\mainwindow.h:17: błąd:C2143: syntax error : missing ';' before '*'
c:\users\mati\komunikator_klient_da_ze\mainwindow.h:17: błąd:C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\users\mati\komunikator_klient_da_ze\mainwindow.h:17: błąd:C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\users\mati\komunikator_klient_da_ze\mainwindow.h:17: błąd:C2143: syntax error : missing ';' before '*'
c:\users\mati\komunikator_klient_da_ze\mainwindow.h:17: błąd:C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\users\mati\komunikator_klient_da_ze\mainwindow.h:17: błąd:C4430: missing type specifier - int assumed. Note: C++ does not support default-int
To copy to clipboard, switch view to plain text mode
The problem can easily be fixed, by removing line 17, recompliling the project (which gives even more errors) and then putting that line back. Everything will work fine, until I change logindialog.cpp again.
While it doesn't make it impossible to continue the project, it makes it very annoying...
The IDE I use is QtCreator 2.4.1
Could someone please help me?
Bookmarks