33 lines
617 B
C++
33 lines
617 B
C++
#ifndef CWEBENGINEVIEW_H
|
|
#define CWEBENGINEVIEW_H
|
|
|
|
#include <QWebEngineView>
|
|
|
|
class CWebEngineView : public QWebEngineView
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit CWebEngineView(QWidget* parent = Q_NULLPTR);
|
|
~CWebEngineView();
|
|
|
|
void setParentWidget(QWidget *parent);
|
|
|
|
signals:
|
|
void favIconChanged(const QIcon &icon);
|
|
|
|
protected:
|
|
CWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
|
|
|
|
private slots:
|
|
void handleContextMenuRequested(const QPoint &pos);
|
|
|
|
private:
|
|
QIcon favIcon() const;
|
|
|
|
private:
|
|
int m_loadProgress;
|
|
QWidget *m_pParent;
|
|
};
|
|
|
|
#endif // CWEBENGINEVIEW_H
|