라이브러리 qwebpage 에서 qwebenginepage로 변경 qt5.4 -> qt5.5.1 이상으로 변경 (이것만) git-svn-id: svn://192.168.0.12/source@307 8346c931-da38-4b9b-9d4c-e48b93cbd075
44 lines
1020 B
C++
44 lines
1020 B
C++
#include "swebpage.h"
|
|
#include <iostream>
|
|
#include <QDebug>
|
|
SWebPage::SWebPage(QObject *parent): QWebEnginePage(parent)
|
|
{
|
|
|
|
}
|
|
|
|
void SWebPage::javaScriptAlert(const QUrl &securityOrigin, const QString &msg)
|
|
{
|
|
qDebug() << "alert";
|
|
emit signalAlert(msg);
|
|
}
|
|
/*
|
|
bool SWebPage::javaScriptConfirm(const QUrl &securityOrigin, const QString &msg)
|
|
{
|
|
qDebug() << "confirm";
|
|
emit signalAlert(msg);
|
|
return false;
|
|
}
|
|
|
|
void SWebPage::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID)
|
|
{
|
|
qDebug() << "console";
|
|
emit signalAlert(message);
|
|
}
|
|
|
|
bool SWebPage::javaScriptPrompt(const QUrl &securityOrigin, const QString &msg, const QString &defaultValue, QString *result)
|
|
{
|
|
qDebug() << "prompt";
|
|
emit signalAlert(msg);
|
|
return false;
|
|
}
|
|
*/
|
|
/*
|
|
QWebPage * SWebPage::createWindow(WebWindowType type)
|
|
{
|
|
qDebug() << "createwindow";
|
|
emit signalAlert("???");
|
|
return nullptr;
|
|
}
|
|
*/
|
|
|