summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginepage.h
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-01-16 22:43:07 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-02-01 10:53:04 +0100
commita6fb2c592bac997baf87016e9dd6b7a3c061ef3c (patch)
treeee41adcddb4868053830840826fa62abb6411330 /src/webenginewidgets/api/qwebenginepage.h
parent3d22e15a3f1a54427b870e4df97e3898fe8c8339 (diff)
Add getter/signal to get the render process PID
This can useful for e.g. implementing something like the "Task manager" in Chromium or otherwise interacting with the render process (e.g. to kill it for some reason while debugging). [ChangeLog] Add a renderProcessPid() getter to (Q)WebEnginePage which allows getting the process ID of the underlying render process. Change-Id: Id5d59be9b6bd46ffc3a6aa480cb5ff7bd3b8aa31 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.h')
-rw-r--r--src/webenginewidgets/api/qwebenginepage.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h
index cd012ea70..3cf6a9f8b 100644
--- a/src/webenginewidgets/api/qwebenginepage.h
+++ b/src/webenginewidgets/api/qwebenginepage.h
@@ -92,6 +92,7 @@ class QWEBENGINEWIDGETS_EXPORT QWebEnginePage : public QObject {
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
Q_PROPERTY(LifecycleState lifecycleState READ lifecycleState WRITE setLifecycleState NOTIFY lifecycleStateChanged)
Q_PROPERTY(LifecycleState recommendedState READ recommendedState NOTIFY recommendedStateChanged)
+ Q_PROPERTY(qint64 renderProcessPid READ renderProcessPid NOTIFY renderProcessPidChanged)
public:
enum WebAction {
@@ -305,6 +306,7 @@ public:
bool isAudioMuted() const;
void setAudioMuted(bool muted);
bool recentlyAudible() const;
+ qint64 renderProcessPid() const;
void printToPdf(const QString &filePath, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF()));
void printToPdf(const QWebEngineCallback<const QByteArray&> &resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF()));
@@ -361,6 +363,7 @@ Q_SIGNALS:
void contentsSizeChanged(const QSizeF &size);
void audioMutedChanged(bool muted);
void recentlyAudibleChanged(bool recentlyAudible);
+ void renderProcessPidChanged(qint64 pid);
void pdfPrintingFinished(const QString &filePath, bool success);
void printRequested();