Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Assistant setSource doesn't work

Qt Assistant setSource doesn't work

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 2 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Maxim Skvortsov
    wrote on last edited by Maxim Skvortsov
    #1

    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 the QProcess::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 emit bytesWritten signal? Maybe any ideas what can i try to do else?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Maxim Skvortsov
      wrote on last edited by Maxim Skvortsov
      #9

      So the decision in my case is to do not use setSource with QProcess::write. I used -showUrl option and it worked. This option must be provided with other arguments.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        What version of Qt are you using ?
        On what platform ?

        Did you check the standard output and standard error ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        M 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          What version of Qt are you using ?
          On what platform ?

          Did you check the standard output and standard error ?

          M Offline
          M Offline
          Maxim Skvortsov
          wrote on last edited by
          #3

          @SGaist I am using Qt 5.7 with gcc on linux. Signals QProcess::readyReadStandardError and QProcess::readyReadStandardOutput are connected to lambda, which is printing them using qDebug(). There are no errors or any output. Also i connected QProcess::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.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            What arguments are you passing to Assistant when starting it ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            M 1 Reply Last reply
            0
            • SGaistS SGaist

              What arguments are you passing to Assistant when starting it ?

              M Offline
              M Offline
              Maxim Skvortsov
              wrote on last edited by Maxim Skvortsov
              #5

              @SGaist
              I am providing only collection file and -enableRemoteControl command to assistant

              QStringList args;
              args << QLatin1String("-collectionFile")
                   << QLatin1String(QString(PATH_TO_HELP).toLatin1())
                   << QLatin1String("-enableRemoteControl");
              
              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #6

                Would it possible for you to provide a minimal compilable example with some sample documentation files you are trying to show to test ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                M 2 Replies Last reply
                0
                • SGaistS SGaist

                  Would it possible for you to provide a minimal compilable example with some sample documentation files you are trying to show to test ?

                  M Offline
                  M Offline
                  Maxim Skvortsov
                  wrote on last edited by Maxim Skvortsov
                  #7

                  @SGaist Here is a simple example project: https://drive.google.com/open?id=1O8JwjYYT-RRlPf0dHksYjwfCj8BmdHKq
                  You'll need to place doc folder from project to directory where you built the project.

                  1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Would it possible for you to provide a minimal compilable example with some sample documentation files you are trying to show to test ?

                    M Offline
                    M Offline
                    Maxim Skvortsov
                    wrote on last edited by
                    #8
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Maxim Skvortsov
                      wrote on last edited by Maxim Skvortsov
                      #9

                      So the decision in my case is to do not use setSource with QProcess::write. I used -showUrl option and it worked. This option must be provided with other arguments.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved