25 lines
679 B
C++
25 lines
679 B
C++
#ifndef SWEBPAPGE
|
|
#define SWEBPAPGE
|
|
#include <QWebPage>
|
|
|
|
class SWebPage:public QWebPage
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
SWebPage(QObject * parent = 0);
|
|
|
|
protected:
|
|
void javaScriptAlert(QWebFrame * frame, const QString & msg) override;
|
|
bool javaScriptConfirm(QWebFrame * frame, const QString & msg) override;
|
|
void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID);
|
|
bool javaScriptPrompt(QWebFrame * frame, const QString & msg, const QString & defaultValue, QString * result);
|
|
QWebPage * createWindow(WebWindowType type);
|
|
signals:
|
|
void signalAlert(const QString& msg);
|
|
};
|
|
|
|
|
|
|
|
#endif // SWEBPAPGE
|
|
|