33 lines
762 B
C++
33 lines
762 B
C++
#include "mainwindow.h"
|
|
#include "ui_mainwindow.h"
|
|
#include <QtWebKit>
|
|
|
|
MainWindow::MainWindow(QWidget *parent) :
|
|
QMainWindow(parent),
|
|
ui(new Ui::MainWindow)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
MainWindow::~MainWindow()
|
|
{
|
|
//ObserverClientModel->Finish();
|
|
delete ui;
|
|
}
|
|
|
|
|
|
void MainWindow::OpenMap()
|
|
{
|
|
QUrl url("C:/Workplace/Projects/Qt/K-observer_client/script.html");
|
|
//QUrl url("../K-observer_client/script.html");
|
|
//QUrl url("script.html");
|
|
|
|
|
|
ui->webView->settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
|
|
ui->webView->load(url);
|
|
|
|
ui->webView->page()->setContentEditable(true);
|
|
|
|
//ui->webView->page()->mainFrame()->evaluateJavaScript("this.AddMarker(37.443195, 55.888869);");
|
|
}
|