Update HelpForm with correct enviroment.
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include <QWebEnginePage>
|
#include <QWebEnginePage>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QWebEngineProfile>
|
#include <QWebEngineProfile>
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
HelpForm::HelpForm(QWidget* aParent)
|
HelpForm::HelpForm(QWidget* aParent)
|
||||||
: QWidget(aParent)
|
: QWidget(aParent)
|
||||||
@@ -19,7 +20,8 @@ HelpForm::~HelpForm()
|
|||||||
|
|
||||||
void HelpForm::init()
|
void HelpForm::init()
|
||||||
{
|
{
|
||||||
mPdfWidget->setUrl(QUrl("file:///home/sun/GUI/web/web/viewer.html?file=file:///home/sun/GUI/web/web/compressed.tracemonkey-pldi-09.pdf"));
|
QString path = QApplication::applicationDirPath();
|
||||||
|
mPdfWidget->setUrl(QUrl("file://" + path +"/web/web/viewer.html?file=file://" + path +"/cfgs/help.pdf"));
|
||||||
QWebChannel * channel = new QWebChannel(this);
|
QWebChannel * channel = new QWebChannel(this);
|
||||||
channel->registerObject(QStringLiteral("communicator"), new QObject(this));
|
channel->registerObject(QStringLiteral("communicator"), new QObject(this));
|
||||||
mPdfWidget->page()->setWebChannel(channel);
|
mPdfWidget->page()->setWebChannel(channel);
|
||||||
|
|||||||
Reference in New Issue
Block a user