summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp
blob: f5097a9f814e0c94d4e4c9e3419b7c6634cfc7c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//! [0]
        QProcess *process = new QProcess(this);
        QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
            + QLatin1String("/assistant");
        
        process->start(app, QStringList() << QLatin1String("-enableRemoteControl"));
        if (!process->waitForStarted()) {
            QMessageBox::critical(this, tr("Remote Control"),
                tr("Could not start Qt Assistant from %1.").arg(app));
            return;
        }
        
        // show index page
        QTextStream str(process);
        str << QLatin1String("SetSource qthelp://mycompany.com/doc/index.html")
            << QLatin1Char('\0') << endl;
    }
//! [0]


//! [1]
        CONFIG += assistant
//! [1]