Qt:程序异常退出

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012790503/article/details/52356593

现象

编译成功,但是运行时崩溃并在控制台输出:“程序异常错误”。

可能原因

查阅资料,原因可能是库错误。

最终解决方法

的确是库错误,原因是编译库的Qt版本和使用该库的Qt程序对应的Qt版本不相同。需要使用相同版本的Qt来生成库和应用程序。

QT程序异常退出

12-23

我在window下编写的程序能够正常运行,然后把源码拿到linux下的QTCreator结果程序异常退出,win下linux都是QT5.3.2,构建是没有任何问题的,可是运行就直接异常结束了,rn报错如下:rnStarting /home/zqs/QT/build-Final-Desktop_Qt_5_4_0_GCC_64bit-Debug/Final...rnQMetaObject::connectSlotsByName: No matching signal for on_button_turn_liucheng_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_turn_xitong_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_turn_netconfig_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_turn_data_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_turn_historydata_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_turn_alarm_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_turn_shezhi_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_true_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_1_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_2_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_3_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_4_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_5_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_6_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_7_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_8_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_9_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_0_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_dian_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_shanchu_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_clean_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_ok_clicked()rnQMetaObject::connectSlotsByName: No matching signal for on_button_close_clicked()rn程序异常结束。rn/home/zqs/QT/build-Final-Desktop_Qt_5_4_0_GCC_64bit-Debug/Final crashedrn这个报错没有任何提示,运行应该弹出我创建的窗口,可是窗口都还没有弹出就直接异常结束了 论坛

没有更多推荐了,返回首页