0

I have Eclipse with Qt. I create new Qt Console project. When I run this project, build and run is without any problems. But when I create Qt QUI project, ui_guiapplication.h and ui_guiapplication.cpp file are not generated. This header file is require in this header file:

#ifndef GUIAPPLICATION_H
#define GUIAPPLICATION_H

#include <QtWidgets/QWidget>
#include "ui_guiapplication.h"

namespace Ui{
    class GuiApplicationClass;
}

class GuiApplication : public QWidget
{
    Q_OBJECT

public:
    GuiApplication(QWidget *parent = 0);
    ~GuiApplication();

private:
    Ui::GuiApplicationClass ui;
};

#endif // GUIAPPLICATION_H

I thing that miss two file: ui_quiapplicaton.cpp and ui_guiapplication.h. Because these files is not generated and what i must doing for obtain these? Thanks

Ondřej Ryška
  • 461
  • 1
  • 11
  • 23
  • I advice you to create your project under Qt creator, if you really need eclipse, take a look here: http://doc.qt.digia.com/qt-eclipse/ – Martin Jul 05 '14 at 10:26
  • I know that is Qt Creator is better. But I must using Eclipse in my work. Thanks for link. – Ondřej Ryška Jul 05 '14 at 10:37

1 Answers1

0

I resolve this problem by change "QT" value in .pro file. Old .pro file was:

TEMPLATE = app
TARGET = GuiApplication2 

QT        += core gui 

HEADERS   += guiapplication2.h
SOURCES   += main.cpp \
    guiapplication2.cpp
FORMS     += guiapplication2.ui    
RESOURCES +=

and I now this file is:

TEMPLATE = app
TARGET = GuiApplication2 

QT        += gui declarative 

HEADERS   += guiapplication2.h
SOURCES   += main.cpp \
    guiapplication2.cpp
FORMS     += guiapplication2.ui    
RESOURCES +=

After change .pro file i run qmake, build app, and missing files was generate and app run without problems.

Ondřej Ryška
  • 461
  • 1
  • 11
  • 23