diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-02-12 11:22:41 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-03-30 12:35:46 +0000 |
commit | 6454b6b2d0f2fbb8d140fa2555af7867964748ce (patch) | |
tree | e2d209aa02aca0bbc93fd58379524acc69e8b544 /src/webenginewidgets/api/qwebenginepage.h | |
parent | 3e30c0a33e301bb993efc7a046a34c8cbc68ca58 (diff) |
Add API for context menu data
For QWebEnginePage users to be able to make custom context menu or
extend the default context menu, they need information about the
context.
This patch adds a QWebEngineContextMenuData class that contains
contextual information when a context menu is being requested.
This is also means we can finally generate a custom context-menu in
the demobrowser the same way we did in QtWebKit.
Task-number: QTBUG-51079
Change-Id: I695b8cbf648bdc7f119b0ed51ab685cf2f8de8e4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.h')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h index 8d6da4459..6ca79e946 100644 --- a/src/webenginewidgets/api/qwebenginepage.h +++ b/src/webenginewidgets/api/qwebenginepage.h @@ -54,6 +54,7 @@ QT_BEGIN_NAMESPACE class QMenu; class QWebChannel; +class QWebEngineContextMenuData; class QWebEngineFullScreenRequest; class QWebEngineHistory; class QWebEnginePage; @@ -274,6 +275,9 @@ public: #else void printToPdf(const QPageLayout &layout, const QWebEngineCallback<const QByteArray&> &resultCallback); #endif + + const QWebEngineContextMenuData &contextMenuData() const; + Q_SIGNALS: void loadStarted(); void loadProgress(int progress); |