Qt Assistant does not work on Linux with enableRemoteControl parameter

I have an application in Qt trying to use the helper for reference. It works on 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; } 

No error, I get an open window - insensitive and empty.

If I remove the " -enableRemoteControl " parameter, it will work.

Performance

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

launches the assistant using the correct help collection.

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

The Qt documentation says that "For the assistant to listen to your application, enable its remote control functions by passing the command line -enableRemoteControl option."

But ... it works from my application without this option ... and does not work with it?

Can someone explain why?

0
source share
1 answer

This seems to be a bug recently reviewed.

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

"Fixed message:

Assistant: updating the update index when starting in remote control mode

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

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

0
source

Source: https://habr.com/ru/post/1207152/


All Articles