qt/K-observer_client_qt/mainwindow.cpp
2013-01-19 20:12:40 +00:00

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);");
}