You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
StoreTry/webapp.cpp

39 lines
861 B

#include "webapp.h"
#include "ui_webapp.h"
#include <QtCore/QVariant>
#include <QtWebEngineWidgets/QWebEngineView>
#include <QtWidgets/QApplication>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QStatusBar>
#include <QtWidgets/QWidget>
#include <QtWebEngineWidgets>
#include <QUrl>
#include <QWebElement>
#include <QWebFrame>
WebApp::WebApp(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::WebApp)
{
ui->setupUi(this);
}
void WebApp::setPath(QString _appPath)
{
ui->setupUi(this);
appPath = _appPath;
_lastUrl = QUrl::fromLocalFile(appPath+"/StoreMain.html");
ui->webEngineView->load(_lastUrl);
connect(ui->webEngineView, &QWebEngineView::urlChanged, this, &WebApp::onUrlChanged);
}
void WebApp::SetUrl()
{
ui->webEngineView->load(_lastUrl);
}
WebApp::~WebApp()
{
delete ui;
}