That was display()-thing was a typo. It is a SIGNAL
Here is my code. I'll just post the relevant parts, but you'll habe to live with the fact, that the naming of my files/variables is german:
DGM_Analyse.h:
#ifndef DGM_ANALYSE
#define DGM_ANALYSE
#include "Mainheader.h"
{
Q_OBJECT
public:
signals:
void entw_anzeigen();
};
#endif
#ifndef DGM_ANALYSE
#define DGM_ANALYSE
#include "Mainheader.h"
class DGM_Analytik:public QObject
{
Q_OBJECT
public:
DGM_Analytik(QObject* = 0);
signals:
void entw_anzeigen();
};
#endif
To copy to clipboard, switch view to plain text mode
---------------------------------
DGM_Analyse.cpp:
Well, a lot of functions in here, so the on line about the signal:
emit entw_anzeigen();
emit entw_anzeigen();
To copy to clipboard, switch view to plain text mode
----------------------------------
Hauptfenster.h: (MainWindow)
#ifndef HAUPTFENSTER_H
#define HAUPTFENSTER_H
#include "DGM_Analyse.h"
{
Q_OBJECT
public:
Hauptfenster();
public slots:
void Entw_Layer();
};
#endif
#ifndef HAUPTFENSTER_H
#define HAUPTFENSTER_H
#include "DGM_Analyse.h"
class Hauptfenster:public QMainWindow
{
Q_OBJECT
public:
Hauptfenster();
public slots:
void Entw_Layer();
};
#endif
To copy to clipboard, switch view to plain text mode
-----------------------------------------
and finally Hauptfenster.cpp:
Hauptfenster::Hauptfenster()
{
...
Analytik = new DGM_Analytik(this);
connect(Analytik, SIGNAL(entw_anzeigen()), this, SLOT(Entw_Layer()));
...
}
Hauptfenster::Hauptfenster()
{
...
Analytik = new DGM_Analytik(this);
connect(Analytik, SIGNAL(entw_anzeigen()), this, SLOT(Entw_Layer()));
...
}
To copy to clipboard, switch view to plain text mode
Hope that helped.
Daniel
Bookmarks