Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
screencapturesnippets.cpp
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#
include
<
QMediaCaptureSession
>
5
#
include
<
QScreenCapture
>
6
#
include
<
QVideoWidget
>
7
8
void
wrapper0
()
9
{
10
11
//! [Basic setup]
12
QMediaCaptureSession session;
13
QScreenCapture screenCapture;
14
session.setScreenCapture(&screenCapture);
15
16
QVideoWidget videoWidget;
17
session.setVideoOutput(&videoWidget);
18
videoWidget.show();
19
20
// With no screen set, the primary screen is captured once capturing starts.
21
screenCapture.start();
22
//! [Basic setup]
23
24
}
// wrapper0()
wrapper0
void wrapper0()
Definition
screencapturesnippets.cpp:8
qtmultimedia
src
multimedia
doc
snippets
multimedia-snippets
screencapturesnippets.cpp
Generated on
for Qt by
1.16.1