Hi. I've got a problem. When compile project files:
Maker.cpp
#include <QtGui>
#include "maker.h"
{
ui.setupUi(this);
connect(actionAbout, SIGNAL(triggered()), this, SLOT(abcziom()));
}
void MainWindow::abcziom()
{
tr("The <b>Application</b> example demonstrates how to "
"write modern GUI applications using Qt, with a menu bar, "
"toolbars, and a status bar."));
}
#include <QtGui>
#include "maker.h"
MainWindow::MainWindow(QMainWindow *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
connect(actionAbout, SIGNAL(triggered()), this, SLOT(abcziom()));
}
void MainWindow::abcziom()
{
QMessageBox::warning(this, tr("About Application"),
tr("The <b>Application</b> example demonstrates how to "
"write modern GUI applications using Qt, with a menu bar, "
"toolbars, and a status bar."));
}
To copy to clipboard, switch view to plain text mode
Maker.h
#ifndef MAKER_H
#define MAKER_H
#include "ui_maker.h"
class MainWindow
: public QMainWindow,
public Ui
::MainWindow {
Q_OBJECT
public:
private slots:
void abcziom();
private:
Ui::MainWindow ui;
};
#endif
#ifndef MAKER_H
#define MAKER_H
#include "ui_maker.h"
class MainWindow : public QMainWindow, public Ui::MainWindow
{
Q_OBJECT
public:
MainWindow(QMainWindow *parent = 0);
private slots:
void abcziom();
private:
Ui::MainWindow ui;
};
#endif
To copy to clipboard, switch view to plain text mode
ui_Maker.h, resource.qrc, and main.cpp:
#include <QApplication>
#include <QPlastiqueStyle>
#include "maker.h"
int main(int argc, char *argv[])
{
MainWindow MainWindow;
MainWindow.show();
return app.exec();
}
#include <QApplication>
#include <QPlastiqueStyle>
#include "maker.h"
int main(int argc, char *argv[])
{
QApplication::setStyle ( new QPlastiqueStyle() );
QApplication app(argc, argv);
MainWindow MainWindow;
MainWindow.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
everything is ok, is builds the executable, but when I try to run it, there appear well known window - this is translation -
There appeared error with Test.exe application and it will be shut down. Sorry for problems. (the Polish version is: Wystąpił problem z aplikacją Test.exe i zostanie ona zamknięta. Przepraszamy za kłopoty.)
What is wrong? I tried to compile it twice, but without success. Regards
Bookmarks