Debugging problem

Apr 14, 2016 at 7:45am

Please can someone help me with this problem?
error1: expected class-name before '}' token
}
^
error2: expected '{' before '}' token

error3: expected unqualified-id before '}' token

error4: expected unqualified-id before 'public'
public QMainWindow:
^



Down here is my code.

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <mainwindow.h>


#include <QFileDialog>
#include <QLabel>

namespace Ui
{
class Mainwindow:
}

public QMainWindow:

{
Q_OBJECT

public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();

protected:
void changeEvent (QEvent *e);

private slots:
void on_pushButton_clicked();

private:
Ui::MainWindow *ui;
}

#endif // MAINWINDOW_H
Apr 14, 2016 at 7:57am
A derived class is usually written:
1
2
3
class Foo : public Bar
{
};

You have written:
1
2
3
public Bar :
{
}

Apr 14, 2016 at 9:04am
Please Keskiverto thank you so much, but i'm just learning alone on ground, can you just correct my entire code please?

Thank you.
Apr 14, 2016 at 9:25am
If you're learning alone then you'll gain much more understanding correcting your own code. :-)
Topic archived. No new replies allowed.