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:
#ifndef ROOTWINDOW_H
#define ROOTWINDOW_H
#include <QMainWindow>
#include <QObject>
#include <QWidget>
{
Q_OBJECT
public:
explicit RootWindow
(QWidget *parent
= 0);
private:
int myvalue;
public slots:
void Slot_PopUp();
};
#endif // ROOTWINDOW_H
#ifndef ROOTWINDOW_H
#define ROOTWINDOW_H
#include <QMainWindow>
#include <QObject>
#include <QWidget>
class RootWindow : public QWidget
{
Q_OBJECT
public:
explicit RootWindow(QWidget *parent = 0);
private:
int myvalue;
public slots:
void Slot_PopUp();
};
#endif // ROOTWINDOW_H
To copy to clipboard, switch view to plain text mode
and the .cpp
#include "rootwindow.h"
{
}
void RootWindow::Slot_PopUp()
{
}
#include "rootwindow.h"
RootWindow::RootWindow(QWidget *parent) : QWidget(parent)
{
}
void RootWindow::Slot_PopUp()
{
}
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
Bookmarks