I am using Qt in Visual Studio 2013 in C ++. I am 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 do not know what happened. This code worked before, but after I migrated the code from Visual Studio 2012 to 32-bit in Visual Studio 2013 to 64-bit and made some changes, it no longer works. It prints debugging statements: before sending, sending the image and connecting, but it does not print the received image. Can anybody help?
Streamer.h
signals:
void processedImageStream(const vector<QImage> &imgs, const QImage &image2, const QImage &image3, const QImage &image4);
Streamer.cpp in run () function
qDebug() << "before sending";
emit processedImageStream(imgs,imgIntel, imgIntelDepth, imgIntelIR);
qDebug() << "images sent!";
mainwindow.h
private slots:
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)
{
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);
}
void MainWindow::updateStreamerUI(const vector<QImage> &imgs, const QImage &imgIntel, const QImage &imgIntelDepth, const QImage &imgIntelIR) {
qDebug() << "images received!";
}