Solved Qt Assistant setSource doesn't work
-
Hi. I am using Qt Assistant as help viewer with custom help project file. And before i ran into a problem https://forum.qt.io/topic/94973/project-hangs-on-qprocess-start-when-starting-qtassistant it worked fine. Now i resolved the problem, but when i trying to use
setSource
command through theQProcess::write
as described in manual, it doesnt work. The code is:proc->start(app,args); if (!proc->waitForStarted()) { emit closed(); return false; } QByteArray ba; ba.append("setSource qthelp://my_project_help_namespace/doc/test.html\n"); proc->write(ba);
Does
QProcess::write
emitbytesWritten
signal? Maybe any ideas what can i try to do else? -
So the decision in my case is to do not use
setSource
withQProcess::write
. I used-showUrl
option and it worked. This option must be provided with other arguments. -
Hi,
What version of Qt are you using ?
On what platform ?Did you check the standard output and standard error ?
-
@SGaist I am using Qt 5.7 with gcc on linux. Signals
QProcess::readyReadStandardError
andQProcess::readyReadStandardOutput
are connected to lambda, which is printing them usingqDebug()
. There are no errors or any output. Also i connectedQProcess::bytesWritten
the same way i am getting messages only when i am restarting assistant (close, wait for finished before code in topic). If i will close it using exit button, there is no message. -
What arguments are you passing to Assistant when starting it ?
-
@SGaist
I am providing only collection file and-enableRemoteControl
command to assistantQStringList args; args << QLatin1String("-collectionFile") << QLatin1String(QString(PATH_TO_HELP).toLatin1()) << QLatin1String("-enableRemoteControl");
-
Would it possible for you to provide a minimal compilable example with some sample documentation files you are trying to show to test ?
-
@SGaist Here is a simple example project: https://drive.google.com/open?id=1O8JwjYYT-RRlPf0dHksYjwfCj8BmdHKq
You'll need to placedoc
folder from project to directory where you built the project. -
This post is deleted! -
So the decision in my case is to do not use
setSource
withQProcess::write
. I used-showUrl
option and it worked. This option must be provided with other arguments.