Results 1 to 6 of 6

Thread: error: expected class-name before "{" token

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    May 2009
    Posts
    55
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: error: expected class-name before "{" token

    So here's what I came up with my webcam.h:
    Qt Code:
    1. #ifndef WEBCAM_H
    2. #define WEBCAM_H
    3.  
    4. #include <QWaitCondition>
    5. #include <QWidget>
    6. #include "ui_webcam.h"
    7.  
    8. class CapturingThread;
    9. class ImageBuffer;
    10. class RenderingThread;
    11.  
    12. class WebcamWidget : public QWidget
    13. {
    14. Q_OBJECT
    15.  
    16. public:
    17. WebcamWidget(QWidget *parent=0);
    18. ~WebcamWidget();
    19.  
    20. protected:
    21. void paintEvent(QPaintEvent* event);
    22.  
    23. private slots:
    24. void startThreads();
    25. void haltThreads();
    26. void updatePixmap(QImage& image);
    27.  
    28. private:
    29. Ui::webcam ui;
    30. CapturingThread* capturingThread;
    31. ImageBuffer* imageBuffer;
    32. RenderingThread* renderingThread;
    33. QPixmap pixmap;
    34. QWaitCondition waitCondition;
    35. QWaitCondition* pWaitCondition;
    36. };
    37.  
    38. #endif
    To copy to clipboard, switch view to plain text mode 

    This time, flagged me 2 errors.
    error: using-declaration for non-member at class scope
    error: expected ";" before "ui"
    Last edited by freekill; 9th January 2010 at 10:36.

Similar Threads

  1. Replies: 3
    Last Post: 26th April 2009, 17:54
  2. error: expected class-name before '{' token
    By Aresti in forum Qt Programming
    Replies: 1
    Last Post: 12th November 2008, 20:00
  3. Replies: 3
    Last Post: 10th November 2008, 16:14
  4. Replies: 4
    Last Post: 22nd February 2008, 19:08
  5. Replies: 2
    Last Post: 30th January 2008, 20:06

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.