Servus,
bin am verzweifeln…
mein noch kleines programm erzeugt folgenden Fehler im Terminal:
Object::connect: No such slot QOject::openMainWindow() in [...]\SpiritUI.cpp:13
SpiritUI.h:
#include
#ifndef SPIRITUI\_H
#define SPIRITUI\_H
class SpiritUI : public QObject {
public:
SpiritUI();
~SpiritUI();
void openSettings();
void openUpdateView();
protected:
private:
QIcon spirit\_icon;
QSystemTrayIcon tray\_icon;
QMenu tray\_menu;
QAction \*open\_main\_window\_action;
QDialog main\_window;
private slots:
void openMainWindow();
};
#endif // SPIRITUI\_H
SpiritUI.cpp:
#include "../include/SpiritUI.h"
#include
#include
SpiritUI::SpiritUI(){
// Load icon from res/icon.png and attach it with menu to the tray
spirit\_icon = QIcon("res/icon.png");
tray\_icon.setIcon(spirit\_icon);
open\_main\_window\_action = new QAction(tr("Oeffne Interface..."),this);
tray\_menu.addAction(open\_main\_window\_action);
connect(open\_main\_window\_action,SIGNAL(triggered()),this,
SLOT(openMainWindow()));
tray\_menu.addAction("Beenden");
tray\_icon.setContextMenu(&tray\_menu);
if(tray\_icon.isSystemTrayAvailable())
tray\_icon.show();
}
SpiritUI::~SpiritUI(){
tray\_icon.hide();
}
void SpiritUI::openMainWindow(){
std::cout