summaryrefslogtreecommitdiffstats
path: root/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
diff options
context:
space:
mode:
authorKaloyan Chehlarski <kaloyan.chehlarski@qt.io>2024-03-04 13:38:47 +0100
committerKaloyan Chehlarski <kaloyan.chehlarski@qt.io>2024-08-20 19:19:39 +0000
commit0d9e429b4de070eaac5d5508832f22efdcdf633f (patch)
treee8b73cb6fea163ad616a6932769c0224b605c331 /examples/webenginequick/quicknanobrowser/BrowserWindow.qml
parenta3d01750172e60ab6411748731b02c602ac113f8 (diff)
Hook up quicknanobrowser to screen capturing API
A Qt Quick API was implemented alongside the Widgets one, but it seems the quicknanobrowser example was never updated to make use of it. Pick-to: 6.7 6.8 Change-Id: I8ac996f2237a2673bdbbab85a8174fa166fdd5b1 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'examples/webenginequick/quicknanobrowser/BrowserWindow.qml')
-rw-r--r--examples/webenginequick/quicknanobrowser/BrowserWindow.qml6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 02f5564ac..1c31ea944 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -561,6 +561,7 @@ ApplicationWindow {
settings.webRTCPublicInterfacesOnly: appSettings.webRTCPublicInterfacesOnly
settings.pdfViewerEnabled: appSettings.pdfViewerEnabled
settings.imageAnimationPolicy: appSettings.imageAnimationPolicy
+ settings.screenCaptureEnabled: true
onCertificateError: function(error) {
if (!error.isMainFrame) {
@@ -610,6 +611,11 @@ ApplicationWindow {
request.accept();
}
+ onDesktopMediaRequested: function(request) {
+ // select the primary screen
+ request.selectScreen(request.screensModel.index(0, 0));
+ }
+
onRenderProcessTerminated: function(terminationStatus, exitCode) {
var status = "";
switch (terminationStatus) {