I'm using Qt in Visual Studio 2013 in C++. I'm trying to connect a signal to a slot. The problem is that the signal is sent but the slot function is never called and I don't know what happened. This code was working earlier but after I migrated the code from Visual Studio 2012 in 32 bit to Visual Studio 2013 in 64 bit and made some changes, it doesn't work anymore. It prints the debug statements: before sending, image sent, and connected but it doesn't print out image received. Can someone please help?
Streamer.h
signals:
//Signal to output frame to be displayed
void processedImageStream(const vector<QImage> &imgs, const QImage &image2, const QImage &image3, const QImage &image4);
Streamer.cpp in the run() function
qDebug() << "before sending";
emit processedImageStream(imgs,imgIntel, imgIntelDepth, imgIntelIR);
qDebug() << "images sent!";
MainWindow.h
private slots:
//Display video frame in streamer UI
void updateStreamerUI(const vector<QImage> &imgs, const QImage &imgIntel, const QImage &imgIntelDepth, const QImage &imgIntelIR);
private:
Streamer* myStreamer;
MainWindow.cpp
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
//Streamer initialization
myStreamer = new Streamer();
QObject::connect(myStreamer, SIGNAL(processedImageStream(vector<QImage>, QImage, QImage, QImage)), this, SLOT(updateStreamerUI(vector<QImage>, QImage, QImage, QImage)));
qDebug() << "connected";
ui.setupUi(this);
}
//slot for when new images are sent from the Streamer class
void MainWindow::updateStreamerUI(const vector<QImage> &imgs, const QImage &imgIntel, const QImage &imgIntelDepth, const QImage &imgIntelIR) {
qDebug() << "images received!";
//rest of the code
}