Qt Assistant在Linux中使用enableRemoteControl选项失败 [英] Qt Assistant fails in linux with enableRemoteControl option

查看:199
本文介绍了Qt Assistant在Linux中使用enableRemoteControl选项失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Qt中有一个应用程序,试图使用助手来寻求帮助.它正在Windows中运行,试图使其在Linux上运行.使用此示例

I have an application in Qt, trying to use assistant for help. It is working in windows, trying to make it work on Linux. Using this example

if (process->state() == QProcess::Running)
     return;

 QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator();
 #if !defined(Q_OS_MAC)
     app += QLatin1String("assistant");
 #else
     app += QLatin1String("Assistant.app/Contents/MacOS/Assistant");
 #endif

 QStringList args;
 args << QLatin1String("-collectionFile")
      << "theHelpFile.qhc"
      << QLatin1String("-enableRemoteControl");
 process->start(app, args);
 if (!process->waitForStarted()) {
     QMessageBox::critical(this, tr("Remote Control"),
         tr("Could not start Qt Assistant from %1.").arg(app));
     return;
 }

没有错误,我得到一个打开的窗口-无响应且为空.

There is no error, I get an open window - non-responsive and empty.

如果我删除"-enableRemoteControl"选项,它将起作用.

If I remove the "-enableRemoteControl" option, it works.

运行

/usr/bin/assistant -collectionFile theHelpFile.qhc -enableRemoteControl

使用正确的帮助集合来启动助手.

launches the assistant with the correct help collection.

我在做什么错? "-enableRemoteControl"选项是否必要?

What am I doing wrong ? Is the "-enableRemoteControl" option necessary ?

Qt文档说,在为了使Assistant能够监听您的应用程序,请通过传递-enableRemoteControl命令行选项来打开其远程控制功能."

Qt documentation says that "In order to make Assistant listen to your application, turn on its remote control functionality by passing the -enableRemoteControl command line option."

但是...它在没有该选项的情况下正在我的应用程序中运行...并且无法使用它吗?

But... it is working from my application without that option... and not working with it ?

有人可以解释为什么吗?

Can anybody please explain why ?

推荐答案

似乎是最近已解决的错误

Seems it is a bug that has been addressed recently

https://codereview.qt-project.org/#/c/95279/

提交消息:

助手:在远程控制模式下启动时修复索引更新

Assistant: Fix index updating on startup in the remote control mode

HelpEngineWrapper :: initialDocSetupDone()仅应调用一次 在初始化帮助模型之后.调用它 每个小更新都会导致递归."

HelpEngineWrapper::initialDocSetupDone() should be called only once right after the initialization of the help models. Calling it on every small update leads to recursion."

尽管已修复Qt 5.4 ...我被困在4.8 ...所以我可能无法解决问题...

Fixed for Qt 5.4 though... I am stuck using 4.8... So I may not be able to solve the problem...

这篇关于Qt Assistant在Linux中使用enableRemoteControl选项失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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