summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-04-05 13:04:20 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-04-11 16:36:15 +0200
commit4cecb22d892179de204d874efc912b9f9ed6dca2 (patch)
treeb5d9630d785331aea3011735e4660096f2700b9b
parent2cb9207bda6f1cd7912b9610617150194ea35b75 (diff)
downloadqtmultimedia-4cecb22d892179de204d874efc912b9f9ed6dca2.tar.gz
screen capture example: Remove the 6.6 bits from the documentation
Amends f0e8d1943dae4a2374866371a975bd8317c555e6. Change-Id: Iffec8fd6df3e2608fc002efaf221dcd282185cec Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
-rw-r--r--examples/multimedia/screencapture/doc/src/screencapture.qdoc30
1 files changed, 13 insertions, 17 deletions
diff --git a/examples/multimedia/screencapture/doc/src/screencapture.qdoc b/examples/multimedia/screencapture/doc/src/screencapture.qdoc
index e0c73863f..5cd404a81 100644
--- a/examples/multimedia/screencapture/doc/src/screencapture.qdoc
+++ b/examples/multimedia/screencapture/doc/src/screencapture.qdoc
@@ -8,11 +8,10 @@
\brief Capturing a screen or window.
\meta {tag} {widgets}
- \e{Screen Capture} demonstrates how to capture a screen or window using QScreenCapture.
- The example shows a list of screens and windows and displays a live preview of the
- selected item using a QMediaCaptureSession and a QVideoWidget. There is also a field
- for inputting a window ID manually including a confirm button, and a button
- to start and stop the capturing.
+ \e{Screen Capture} demonstrates how to capture a screen using
+ QScreenCapture. The example shows a list of screens and a live preview of
+ the selected item using a QMediaCaptureSession and a QVideoWidget. There is
+ also a button to start and stop the capturing.
\image screencapture.jpg
@@ -20,25 +19,22 @@
\section1 Application Structure
- The example consists of three custom classes. The UI and all screen capture functionality
- is implemented in the class ScreenCapturePreview. The classes ScreenlListModel and
- WindowListModel only serves as models behind the two QListView widgets. The main function
- creates a ScreenCapturePreview object, which in turn creates an instance of QScreenCapture,
- QMediaCaptureSession and QVideoWidget in addition to all the UI widgets.
+ The example consists of two custom classes. The UI and all screen capture
+ functionality is implemented in the class ScreenCapturePreview. The class
+ ScreenListModel only serves as a model behind the QListView widget. The
+ main function creates a ScreenCapturePreview object, which in turn creates
+ an instance of QScreenCapture, QMediaCaptureSession and QVideoWidget in
+ addition to all the UI widgets.
- The lists are populated with the return values of \l QGuiApplication::screens() and
- \l QGuiApplication::allWindows(). The input field is prefilled with a window ID from the latter.
+ The list is populated with the return value of \l QGuiApplication::screens().
- When a list item is selected or a window ID is input, it is connected to the QScreenCapture object with
- \l QScreenCapture::setScreen(), \l QScreenCapture::setWindow() or \l QScreenCapture::setWindowId().
+ When a list item is selected, it is connected to the QScreenCapture object with
+ \l QScreenCapture::setScreen().
The QScreenCapture object is connected to the QMediaCaptureSession object with
\l QMediaCaptureSession::setScreenCapture(), which in turn is connected to the
QVideoWidget object with \l QMediaCaptureSession::setVideoOutput(). Thus the
screen capture output is previewed in the video widget on the right hand side of the UI.
- The Window ID input field is a QLineEdit object that handles both HEX and
- decimal numbers.
-
The start/stop button calls \l QScreenCapture::start() and \l QScreenCapture::stop().
A QMessageBox pops up if the QScreenCapture::errorOccurred signal is emitted.