qt在运行release报错 无法定位程序输入点 ?setShortcutVisiblelnContextMenu@QAction@@QEAAX_N@Z于动态艇 接库 E:\AVI\1Test'\AVI_Vision-0605\out\buildVx64-Release\AVI_Vision.exe 上。
时间: 2023-07-18 15:39:25 浏览: 93
这个错误通常是由于程序使用了错误的动态链接库版本导致的。可以尝试执行以下操作:
1. 确认程序使用的是正确的动态链接库版本,包括 Qt 动态链接库和其他依赖库。
2. 检查程序的环境变量设置是否正确,特别是 PATH 变量是否包含了正确的库路径。
3. 如果你使用了多个版本的 Qt,确保程序使用的是正确的 Qt 版本。
4. 如果以上方法无效,可以尝试使用依赖查找工具,如 Dependency Walker,来查找程序所缺失的依赖库,并将其添加到程序目录或系统路径中。
希望这些方法能够帮助你解决这个问题。
相关问题
Qt QAction连接槽
可以使用以下代码将 QAction 连接到一个槽:
```cpp
QAction *action = new QAction("Action Text", this); // 创建 QAction 对象
connect(action, &QAction::triggered, this, &MyClass::mySlot); // 将 QAction 对象的 triggered 信号连接到自定义槽函数 mySlot
```
在这个例子中,我们创建了一个 QAction 对象,并将它的 triggered 信号连接到一个名为 mySlot 的槽函数。当用户点击该 QAction 时,它会触发 triggered 信号,从而调用 mySlot 函数。注意,&QAction::triggered 和 &MyClass::mySlot 中的 :: 是必需的。
当然,你需要将 connect 函数的第三个和第四个参数分别替换为你自己的对象和槽函数。
QAction::triggered()是什么信号?
QAction::triggered() 是一个 QAction 类的信号,表示该动作被触发时会发出该信号。当用户在菜单中或工具栏中单击一个 QAction 对象时,就会触发该信号。可以通过连接该信号到一个槽函数来执行相应的操作。例如:
```python
def on_triggered():
print("Action triggered")
action = QAction("My Action", parent)
action.triggered.connect(on_triggered)
```
上面的代码创建了一个 QAction 对象,并将其触发信号连接到 on_triggered 函数。当用户单击该动作时,就会打印出 "Action triggered"。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)