mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
use QWebView to show the user manual
Looks like the QTextBrowser can't render the manual correctly. Also, QWebView provides a better way to find contents on a webpage, which is an important feature for an user manual (to be implemented). Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
This commit is contained in:
parent
2fb2918607
commit
1e69731804
3 changed files with 7 additions and 7 deletions
|
@ -15,7 +15,7 @@
|
|||
#include <QCloseEvent>
|
||||
#include <QApplication>
|
||||
#include <QFontMetrics>
|
||||
#include <QTextBrowser>
|
||||
#include <QWebView>
|
||||
#include <QTableView>
|
||||
#include "divelistview.h"
|
||||
#include "starwidget.h"
|
||||
|
@ -411,14 +411,14 @@ void MainWindow::on_actionAboutSubsurface_triggered()
|
|||
void MainWindow::on_actionUserManual_triggered()
|
||||
{
|
||||
if(!helpView){
|
||||
helpView = new QTextBrowser();
|
||||
helpView = new QWebView();
|
||||
}
|
||||
QString searchPath = getSubsurfaceDataPath("Documentation");
|
||||
if (searchPath != "") {
|
||||
QUrl url(searchPath.append("/user-manual.html"));
|
||||
helpView->setSource(url);
|
||||
helpView->setUrl(url);
|
||||
} else {
|
||||
helpView->setText(tr("Cannot find the Subsurface manual"));
|
||||
helpView->setHtml(tr("Cannot find the Subsurface manual"));
|
||||
}
|
||||
helpView->show();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue