Results 1 to 6 of 6

Thread: Class Confusion

Threaded View

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

    Unhappy Class Confusion

    Qt Code:
    1. #ifndef CALENDARTIME_H
    2. #define CALENDARTIME_H
    3.  
    4. #include <QWidget>
    5. #include "ui_calendar-time.h"
    6.  
    7.  
    8. class CT : public QWidget, public Ui::Calendar-Time
    9. {
    10. Q_OBJECT
    11. public:
    12. CT(CT *parent = 0);
    13. ~CT();
    14. void setColumnRange(QChar first, QChar last);
    15.  
    16.  
    17. };
    18.  
    19. #endif // CALENDARTIME_H
    20.  
    21.  
    22. #include <QtGui/QApplication>
    23. #include "calendar-time.h"
    24.  
    25. int main(int argc, char *argv[])
    26. {
    27. QApplication a(argc, argv);
    28. CT w;
    29. CT.show();
    30. return a.exec();
    31. }
    To copy to clipboard, switch view to plain text mode 

    These are the errors:
    calendar-time.h:8: error: expected class-name before '-' token
    calendar-time.h:8: error: expected '{' before '-' token
    calendar-time.h:8: error: expected unqualified-id before '-' token
    mingw32-make[1]: *** [debug/main.o] Error 1

    I tried a qmake it doesn't help. I seem to always get this problem. :confused








    [/CODE]
    Last edited by Petr_Kropotkin; 23rd January 2010 at 00:08.

Similar Threads

  1. Replies: 3
    Last Post: 27th December 2008, 19:34
  2. Templates Confusion
    By baray98 in forum General Programming
    Replies: 6
    Last Post: 23rd November 2008, 11:14
  3. QT debug confusion
    By swistak in forum Installation and Deployment
    Replies: 2
    Last Post: 24th September 2008, 19:25
  4. Replies: 3
    Last Post: 16th May 2007, 11:07
  5. QProgressBar confusion
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 23rd November 2006, 09:20

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.