本文介绍了QtDbus在Windows 7上的Qt5.4.1中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行Qt Creator dbus示例时,它们无法运行,是否有任何用于QtDbus模块的设置或内容或任何先验性?

When I run the Qt Creator dbus examples, they couldn't run, is there any settings or stuff for working QtDbus module or any prerequistics?

例如在chat项目中:

if (!QDBusConnection::sessionBus().isConnected()) {
    qWarning("Cannot connect to the D-Bus session bus.\n"
             "Please check your system settings and try again.\n");
    return 1;
}

返回1,程序终止.

推荐答案

最后我找到了解决方法:

Finally I found the solution:

要使QtDbus模块正常工作,必须在Windows中安装第三方Dbus模块:

For QtDbus module get working, The 3rd party Dbus module must be installed in Windows:

Dbus Windows Installer下载

下载并安装Dbus之后,无需任何配置即可开始工作. (对于正常运行的QtDbus,必须运行dbus-daemon.exe)

After downloading and installing Dbus, it gets working without any configuration. (for working QtDbus, dbus-daemon.exe must be running)

这篇关于QtDbus在Windows 7上的Qt5.4.1中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-10 15:29