我在C++中使用Visual Studio 2013中的Qt.我正在尝试将信号连接到插槽.问题是信号被发送但是槽功能从未被调用过,我不知道发生了什么.这段代码工作得比较早,但在我将代码从32位的Visual Studio 2012迁移到64位的Visual Studio 2013并进行了一些更改之后,它就不再起作用了.它打印调试语句:在发送,图像发送和连接之前,但它不打印出接收的图像.有人可以帮忙吗?
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);
Run Code Online (Sandbox Code Playgroud)
run()函数中的Streamer.cpp
qDebug() << "before sending";
emit processedImageStream(imgs,imgIntel, imgIntelDepth, imgIntelIR);
qDebug() << "images sent!";
Run Code Online (Sandbox Code Playgroud)
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;
Run Code Online (Sandbox Code Playgroud)
MainWindow.cpp
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
//Streamer initialization
myStreamer = new Streamer();
QObject::connect(myStreamer, …Run Code Online (Sandbox Code Playgroud)