Hello everybody,

Recently, I started to program with Qt and yesterday with Qwt.
My aim was to start with an example simpleplot and add some code to understand how Qwt works.
Qwt is a nice and powerfull library which I would like to use for my small projects.

First exercice was to draw a plot after pushing a button by using slot and signals.
Unfortunately when I added a new class and compile I received 'slot' does not name a type as an error.

In my previous Qt programming, I used the slot and signals systems without having this problem.

Does anybody have an idea what I am doing wrong?
I kindly appreciate any hints which will bring me to solve this small problem.

Here the .h code:

Qt Code:
  1. #ifndef ROOTWINDOW_H
  2. #define ROOTWINDOW_H
  3.  
  4. #include <QMainWindow>
  5. #include <QObject>
  6. #include <QWidget>
  7.  
  8. class RootWindow : public QWidget
  9. {
  10. Q_OBJECT
  11.  
  12. public:
  13. explicit RootWindow(QWidget *parent = 0);
  14.  
  15. private:
  16. int myvalue;
  17.  
  18. public slots:
  19. void Slot_PopUp();
  20.  
  21. };
  22.  
  23. #endif // ROOTWINDOW_H
To copy to clipboard, switch view to plain text mode 

and the .cpp
Qt Code:
  1. #include "rootwindow.h"
  2.  
  3. RootWindow::RootWindow(QWidget *parent) : QWidget(parent)
  4. {
  5.  
  6. }
  7.  
  8. void RootWindow::Slot_PopUp()
  9. {
  10.  
  11. }
To copy to clipboard, switch view to plain text mode 

simpleplot.cpp hasn't changed except the rootmenu include.

Thanks in advance for your Help,
Damien