'QMetaObject :: connectSlotsByName:没有匹配的信号为'错误时构建在Ubuntu QT [英] 'QMetaObject::connectSlotsByName: No matching signal for' error when building on Ubuntu QT

查看:299
本文介绍了'QMetaObject :: connectSlotsByName:没有匹配的信号为'错误时构建在Ubuntu QT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经被问过,虽然我的情况略有不同,我发现没有其他的答案有帮助,我是新的QTCreator。

I realise this question has been asked before, though my circumstances are slightly different and I have found none of the other answers helpful, I am new to QTCreator.

我试图建立一个项目与QTCreator,在OSX上构建良好,但是当它与Ubuntu构建时,我得到这个错误:

I am trying to build a project with QTCreator, that builds fine on OSX but when building it with Ubuntu I get this error:

QMetaObject::connectSlotsByName: No matching signal for on_actionWrite_Device_triggered()

项目仍然构建和部分工作,不会写入外部设备(程序的点)。

The project still builds and partly works, but will not write to an external device (the point of the program).

任何人都可以演示我需要做什么,以前的答案已经说明了明确连接的东西,但没有详细介绍如何做到这一点。任何提示,通过项目搜索找到在哪里做这个修复(我没有写原始的程序)。

Can anyone give a walkthrough of what I need to do, previous answers have said about explicitly connecting things, but not gone into details about how to do this. Any tips on searching through the project to find where to make this fix (I didn't write the original program).

任何帮助赞赏
汤姆

Any help is appreciated Tom

推荐答案

查看:
http://qt-project.org/doc/qt-4.8/qmetaobject.html#connectSlotsByName

方法connectSlotsByName尝试使用以下形式将插槽与信号连接:

The Method connectSlotsByName tries to connect slots to signals using the following form:

void on_<object name>_<signal name>(<signal parameters>);

对象名称和信号名称由下划线分隔。我不确定,但它可能是一个问题,对象名称本身(actionWrite_Device)包含一个下划线,因此不清楚什么是信号名称(它可以是 device_triggered 触发)。这同样适用于对象名称。这种模糊性可能会导致麻烦。

Object name and signal name are separated by an underscore. I'm not sure but it may be a problem that the object name itself (actionWrite_Device) contains an underscore and therefore it is not clear what the signal name is (it could be either device_triggered or triggered). The same holds for the object name. This ambiguity might cause the trouble.

这篇关于'QMetaObject :: connectSlotsByName:没有匹配的信号为'错误时构建在Ubuntu QT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆