Results 1 to 5 of 5

Thread: Can't explain these errors

  1. #1
    Join Date
    Jan 2010
    Posts
    63
    Qt products
    Qt4
    Platforms
    Windows

    Default Can't explain these errors

    The include file ui_calendartime is generated by Qt designer. I need help getting rid of them
    Here is the file:
    Qt Code:
    1. ** Form generated from reading UI file 'calendartime.ui'
    2. **
    3. ** Created: Tue Jan 19 20:25:34 2010
    4. ** by: Qt User Interface Compiler version 4.6.0
    5. **
    6. ** WARNING! All changes made in this file will be lost when recompiling UI file!
    7. ********************************************************************************/
    8.  
    9. #ifndef UI_CALENDARTIME_H
    10. #define UI_CALENDARTIME_H
    11.  
    12. #include <QtCore/QVariant>
    13. #include <QtGui/QAction>
    14. #include <QtGui/QApplication>
    15. #include <QtGui/QButtonGroup>
    16. #include <QtGui/QDateTimeEdit>
    17. #include <QtGui/QDial>
    18. #include <QtGui/QDialog>
    19. #include <QtGui/QHeaderView>
    20. #include <QtGui/QPushButton>
    21.  
    22. QT_BEGIN_NAMESPACE
    23.  
    24. namespace Ui {
    25. class CalendarTime: public Ui_CalendarTime {};
    26. } // namespace Ui
    27.  
    28. class uCalendarTime
    29. {
    30. public:
    31. QDateTimeEdit *dateTimeEdit;
    32. QDial *dial;
    33. QPushButton *Select;
    34. QPushButton *Cancel;
    35.  
    36. void setupUi(QDialog *CalendarTime)
    37. {
    38. if (CalendarTime->objectName().isEmpty())
    39. CalendarTime->setObjectName(QString::fromUtf8("CalendarTime"));
    40. CalendarTime->resize(344, 174);
    41. dateTimeEdit = new QDateTimeEdit(CalendarTime);
    42. dateTimeEdit->setObjectName(QString::fromUtf8("dateTimeEdit"));
    43. dateTimeEdit->setGeometry(QRect(70, 30, 194, 22));
    44. dial = new QDial(uCalendarTime);
    45. dial->setObjectName(QString::fromUtf8("dial"));
    46. dial->setGeometry(QRect(10, 10, 50, 64));
    47. Select = new QPushButton(CalendarTime);
    48. Select->setObjectName(QString::fromUtf8("Select"));
    49. Select->setGeometry(QRect(180, 90, 75, 23));
    50. Cancel = new QPushButton(CalendarTime);
    51. Cancel->setObjectName(QString::fromUtf8("Cancel"));
    52. Cancel->setGeometry(QRect(80, 90, 75, 23));
    53. Cancel->setEnabled(false);
    54.  
    55.  
    56. retranslateUi(CalendarTime);
    57. QMetaObject::connectSlotsByName(CalendarTime);
    58. } // setupUi
    59.  
    60. void retranslateUi(QDialog uCalendarTime)
    61. {
    62. CalendarTime->setWindowTitle(QApplication::translate("CalendarTime", "Dialog", 0, QApplication::UnicodeUTF8));
    63.  
    64. } // retranslateUi
    65.  
    66. };
    67.  
    68.  
    69. QT_END_NAMESPACE
    70.  
    71. #endif // UI_CALENDARTIME_H
    To copy to clipboard, switch view to plain text mode 

    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]

  2. #2
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Can't explain these errors

    Try running qmake.

  3. #3
    Join Date
    Jan 2010
    Posts
    63
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Can't explain these errors

    i did it didn't help so i redid it.

  4. #4
    Join Date
    Dec 2009
    Location
    Bratislava, Slovakia
    Posts
    11
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Can't explain these errors

    try clean the project, delete Makefile, Makefile.release, Makefile.debug, object_script.* and *.pro.user (files that are generated automatically) and rebuild it again

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Can't explain these errors

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 11
    Last Post: 3rd April 2012, 04:51
  2. please explain QUrl::isValid() to me
    By momesana in forum Qt Programming
    Replies: 5
    Last Post: 19th May 2010, 01:19
  3. Explain Qt library sizes, please
    By bnilsson in forum Installation and Deployment
    Replies: 15
    Last Post: 25th July 2009, 10:01
  4. Can anyone explain the behaviour of the QtCreator
    By aarelovich in forum Qt Tools
    Replies: 5
    Last Post: 17th February 2009, 20:13
  5. could somebody please explain const to me?
    By mikro in forum General Programming
    Replies: 4
    Last Post: 29th September 2006, 14:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.