How embed the online help in the application

  • Hello all,
    I am very stupid and I dont understand how to embed the online help in the application.

    I have created the collection file "colelction.qhc", but I dont know how to embed it in my Application.

    If I click on the menu "Help" I should see now the Help TextBrowser....

    Can someone explain me how can I do this please?

  • Hello, first you need a process to execute the Qt assistant. Then assign an action to menu help item, so you have:

    in mainwindow.h
    @QProcess helpProcess;@

    @void on_actionHelp_triggered();@

    in mainwindow.cpp
    @void MainWindow::on_actionHelp_triggered()
    const QStringList arguments = QStringList()
    << QLatin1String("-collectionFile")
    << QLatin1String("help.qhc")
    << QLatin1String("-enableRemoteControl");

    helpProcess.start(QLatin1String("assistant"), args);
       // error control


    Note that help.qhc file must be in the same folder that your application executable.

  • Lifetime Qt Champion


    You might be interest by the "Help module":

    Hope it helps

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.