ich versuche gerade einen raspberry pi zu programieren und habe da ein problem. und blöderweise auch noch zeitdruck

ich habe eine Klasse MainWindow und eine Klasse MobilePlatform, beide erstelle ich einen member in int main.
dann will ich über eine methode setMobilePlatform denn member von MobilePlattform an MainWIndow übergeben.
hier der code dazu.
Code: Alles auswählen
#include "mainwindow.h"
#include <QApplication>
#include "wiringPi.h"
#include "mobileplatform.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
wiringPiSetup();
MainWindow w;
MobilePlatform *m_pMobilePlatform;
w.setMobilePlatform(m_pMobilePlatform);
w.show();
return a.exec();
}
Code: Alles auswählen
MainWindow::setMobilePlatform(MobilePlatform *platform)
{
vmplatform = new platform;
}
Code: Alles auswählen
connect(ui->Vorwaerts, SIGNAL(clicked()), vmplatform, SLOT(slot_moveForward()));
/home/pi/Desktop/MS1/MasterRobots/mainwindow.cpp:12: error: no matching function for call to 'MainWindow::connect(QPushButton*&, const char*, MobilePlatform&, const char*)'
connect(ui->Vorwaerts, SIGNAL(clicked()), vmplatform, SLOT(slot_moveForward()));
^
und noch diese hier:
/home/pi/Desktop/MS1/MasterRobots/mainwindow.h:18: error: candidate is: void MainWindow::setMobilePlatform(MobilePlatform*)
void setMobilePlatform(MobilePlatform *platform);
^
und noch 2 andere.
was ist falsch an meiner übergabe? habe ich vielleicht die variable vmplatform falsch defieniert (diese habe ich in mainwindow.h definiert als:MobilePlatform vmplatform; )?
hoffe ihr könnt mir paar tips geben.