The recommended way of launching Qt Assistant as a custom help viewer is to start a process. The example on that page works great for Linux, but how does one achieve this on Mac, where the Qt Assistant is in an app bundle? Right now I am doing this:
<< helpPath_
#ifdef Q_WS_MAC
#else
#endif
process_->start(app, args);
process_->waitForStarted();
QStringList args;
args << QLatin1String("-collectionFile")
<< helpPath_
<< QLatin1String("-enableRemoteControl");
#ifdef Q_WS_MAC
QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/Assistant.app/Contents/MacOS/Assistant");
#else
QString app = QLatin1String("assistant");
#endif
process_->start(app, args);
process_->waitForStarted();
To copy to clipboard, switch view to plain text mode
This is working, but seems very hackish and fragile to me. Is there a cross-platform way of doing this? If not, is that the recommended way of launching an application within an app bundle as a process? Is the internal folder structure of a Mac app bundle stable?
Thanks for any pointers.
Bookmarks