PDA

View Full Version : Can't explain these errors



Petr_Kropotkin
20th January 2010, 02:55
The include file ui_calendartime is generated by Qt designer. I need help getting rid of them
Here is the file:



** Form generated from reading UI file 'calendartime.ui'
**
** Created: Tue Jan 19 20:25:34 2010
** by: Qt User Interface Compiler version 4.6.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
************************************************** ******************************/

#ifndef UI_CALENDARTIME_H
#define UI_CALENDARTIME_H

#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDateTimeEdit>
#include <QtGui/QDial>
#include <QtGui/QDialog>
#include <QtGui/QHeaderView>
#include <QtGui/QPushButton>

QT_BEGIN_NAMESPACE

namespace Ui {
class CalendarTime: public Ui_CalendarTime {};
} // namespace Ui

class uCalendarTime
{
public:
QDateTimeEdit *dateTimeEdit;
QDial *dial;
QPushButton *Select;
QPushButton *Cancel;

void setupUi(QDialog *CalendarTime)
{
if (CalendarTime->objectName().isEmpty())
CalendarTime->setObjectName(QString::fromUtf8("CalendarTime"));
CalendarTime->resize(344, 174);
dateTimeEdit = new QDateTimeEdit(CalendarTime);
dateTimeEdit->setObjectName(QString::fromUtf8("dateTimeEdit"));
dateTimeEdit->setGeometry(QRect(70, 30, 194, 22));
dial = new QDial(uCalendarTime);
dial->setObjectName(QString::fromUtf8("dial"));
dial->setGeometry(QRect(10, 10, 50, 64));
Select = new QPushButton(CalendarTime);
Select->setObjectName(QString::fromUtf8("Select"));
Select->setGeometry(QRect(180, 90, 75, 23));
Cancel = new QPushButton(CalendarTime);
Cancel->setObjectName(QString::fromUtf8("Cancel"));
Cancel->setGeometry(QRect(80, 90, 75, 23));
Cancel->setEnabled(false);


retranslateUi(CalendarTime);
QMetaObject::connectSlotsByName(CalendarTime);
} // setupUi

void retranslateUi(QDialog uCalendarTime)
{
CalendarTime->setWindowTitle(QApplication::translate("CalendarTime", "Dialog", 0, QApplication::UnicodeUTF8));

} // retranslateUi

};


QT_END_NAMESPACE

#endif // UI_CALENDARTIME_H


Here are the errors for this file

In file included from calendar-time.h:6,
from main.cpp:2:
ui_calendar-time.h: In member function 'void Ui_CalendarTime::setupUi(QDialog*)':
ui_calendar-time.h:55: error: 'pushButton_2' was not declared in this scope
ui_calendar-time.h: In member function 'void Ui_CalendarTime::retranslateUi(QDialog*)':
ui_calendar-time.h:63: error: 'pushButton' was not declared in this scope
ui_calendar-time.h:64: error: 'pushButton_2' was not declared in this scope
ui_calendar-time.h: At global scope:
ui_calendar-time.h:70: error: expected class-name before 'public'
ui_calendar-time.h:70: error: expected '{' before 'public'

Help !
















[/CODE]

boudie
20th January 2010, 15:51
Try running qmake.

Petr_Kropotkin
23rd January 2010, 01:00
i did it didn't help so i redid it.

mirelon
23rd January 2010, 02:57
try clean the project, delete Makefile, Makefile.release, Makefile.debug, object_script.* and *.pro.user (files that are generated automatically) and rebuild it again

wysota
23rd January 2010, 20:06
How are those errors related to the file you pasted? Because they are certainly not caused by trying to compile this file. Either you made some modifications to this file (in that case read what the line #6 of the file says) or you pasted a wrong file.