Hi ,
I have project made in QT 4.7.
Now i see that QT 5 is released and have installed it.
I noticed that a lot of clases has changed.A lot of them now are in QtWidgets/ i changed my code in accordance with this change.
Now i have only one problem before run my code.
The error:
ui_mainwindow.h file not found
I didn't change nothing in the mainwindow.ui file neither in mainwindow.
PLEASE HELP!
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtWidgets/QMainWindow>
#include <ui_mainwindow.h>
#include <info.h>
namespace Ui {
class MainWindow;
}
{
Q_OBJECT
public:
explicit MainWindow
(QWidget *parent
= 0);
~MainWindow();
private slots:
void on_actionNew_triggered();
void on_actionSettings_triggered();
void on_actionAbout_triggered();
void on_actionGroup_triggered();
void on_actionInfo_triggered();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtWidgets/QMainWindow>
#include <ui_mainwindow.h>
#include <info.h>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_actionNew_triggered();
void on_actionSettings_triggered();
void on_actionAbout_triggered();
void on_actionGroup_triggered();
void on_actionInfo_triggered();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
To copy to clipboard, switch view to plain text mode
#include "mainwindow.h"
#include "invoice.h"
#include "settings.h"
#include "customers.h"
#include <QtWidgets/QMessageBox>
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
Info *i=new Info(this);
ui->stackedWidget->addWidget(i);
ui->stackedWidget->setCurrentWidget(i);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_actionNew_triggered()
{
Invoice *inv=new Invoice(this);
ui->stackedWidget->addWidget(inv);
ui->stackedWidget->setCurrentWidget(inv);
}
void MainWindow::on_actionSettings_triggered()
{
Settings *settings=new Settings(this);
ui->stackedWidget->addWidget(settings);
ui->stackedWidget->setCurrentWidget(settings);
}
void MainWindow::on_actionAbout_triggered()
{
//ABOUT DIALOG
msgBox.setText("<html><p align=center><font size=3 face=Arial>Faktura 1.0<br><br>Programming: George Stoichev<br><br><a href=mailto:admin@iabalka.eu>admin@iabalka.eu</a><br><br>CAPRICORN Ltd. © 2011");
msgBox.exec();
}
void MainWindow::on_actionGroup_triggered()
{
Clients *c=new Clients(this);
ui->stackedWidget->addWidget(c);
ui->stackedWidget->setCurrentWidget(c);
}
void MainWindow::on_actionInfo_triggered()
{
Info *info=new Info(this);
ui->stackedWidget->addWidget(info);
ui->stackedWidget->setCurrentWidget(info);
}
#include "mainwindow.h"
#include "invoice.h"
#include "settings.h"
#include "customers.h"
#include <QtWidgets/QMessageBox>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
Info *i=new Info(this);
ui->stackedWidget->addWidget(i);
ui->stackedWidget->setCurrentWidget(i);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_actionNew_triggered()
{
Invoice *inv=new Invoice(this);
ui->stackedWidget->addWidget(inv);
ui->stackedWidget->setCurrentWidget(inv);
}
void MainWindow::on_actionSettings_triggered()
{
Settings *settings=new Settings(this);
ui->stackedWidget->addWidget(settings);
ui->stackedWidget->setCurrentWidget(settings);
}
void MainWindow::on_actionAbout_triggered()
{
//ABOUT DIALOG
QMessageBox msgBox;
msgBox.setText("<html><p align=center><font size=3 face=Arial>Faktura 1.0<br><br>Programming: George Stoichev<br><br><a href=mailto:admin@iabalka.eu>admin@iabalka.eu</a><br><br>CAPRICORN Ltd. © 2011");
msgBox.exec();
}
void MainWindow::on_actionGroup_triggered()
{
Clients *c=new Clients(this);
ui->stackedWidget->addWidget(c);
ui->stackedWidget->setCurrentWidget(c);
}
void MainWindow::on_actionInfo_triggered()
{
Info *info=new Info(this);
ui->stackedWidget->addWidget(info);
ui->stackedWidget->setCurrentWidget(info);
}
To copy to clipboard, switch view to plain text mode
Bookmarks