Results 1 to 11 of 11

Thread: Starting assistant from command line

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Starting assistant from command line

    Two first options are important. The first one loads a specified file and the other turns assistant into a server which you can send commands to, including the thing you want to achieve. Unfortunately I haven't seen the command list anywhere in the docs, so you'd have to look into the sources.

    Edit: Ok, looks like the command name is the page name you wish to open.
    Last edited by wysota; 21st March 2007 at 09:58.

  2. #2
    Join Date
    Feb 2007
    Posts
    9
    Thanked 4 Times in 1 Post

    Default Re: Starting assistant from command line

    Thanks wysota. Obviously the command doc and (in my case) a small executable which can talk to assistant is missing.

    I looked into building a small app which uses the QAssistantClient. but it doesn't seem trivial . Unfortunately I have got real work to do

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Starting assistant from command line

    Why not trivial? I think it should be quite simple.

  4. #4
    Join Date
    Feb 2007
    Posts
    9
    Thanked 4 Times in 1 Post

    Default Re: Starting assistant from command line

    The QAssistantClient::showPage method is asking for a html page filepath. All I need is to get assistant to show the page for say QWidget.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Starting assistant from command line

    I don't see a problem...

  6. #6
    Join Date
    Feb 2007
    Posts
    9
    Thanked 4 Times in 1 Post

    Unhappy Re: Starting assistant from command line

    Let me help you There are two problems right now:

    1. Getting assistant to get to the right page, showPage needs an html file path, like:

    ac.showPage( qtdir + "/doc/html/" + phrase.toLower() + ".html" );

    This means getting assistant locating a phrase like "setClipping" is not possible. Index searching can not be done remotely

    2. Everytime a new QAssistantClient is created, a new assistant process is forked. Not really cool.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Starting assistant from command line

    Quote Originally Posted by mderdem View Post
    1. Getting assistant to get to the right page, showPage needs an html file path, like:

    ac.showPage( qtdir + "/doc/html/" + phrase.toLower() + ".html" );

    This means getting assistant locating a phrase like "setClipping" is not possible. Index searching can not be done remotely
    If you want to search by method name, you can do one of two things:
    a) locate assistant's index file and do the search yourself there
    or
    b) use CTags or a simmilar method to build your own index file and then you can quickly find the proper class for a method and ask assistant to fetch it.

    2. Everytime a new QAssistantClient is created, a new assistant process is forked. Not really cool.
    So don't start a new QAssistantClient but instead reuse the old one.

  8. #8
    Join Date
    Feb 2007
    Posts
    9
    Thanked 4 Times in 1 Post

    Default Re: Starting assistant from command line

    Thanks for the ideas. Obviously you are not bounded by the time limitations I suffer from.

    What you offer is certainly doable. But the purpose is to reuse the assistant and it's features. It would be easier to write a macro in my editor which does a grep and prepares a list of html files and let's me pick one of them.

Similar Threads

  1. Qt Assistant path
    By aamer4yu in forum Installation and Deployment
    Replies: 3
    Last Post: 1st February 2007, 14:23
  2. Replies: 1
    Last Post: 18th July 2006, 12:06
  3. Qt assistant under linux
    By jochen_r in forum Newbie
    Replies: 8
    Last Post: 10th January 2006, 08:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.