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
qquickwindowcapture.cpp
Go to the documentation of this file.
1
// Copyright (C) 2025 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
include
"qquickwindowcapture_p.h"
5
6
QT_BEGIN_NAMESPACE
7
8
QQuickWindowCapture::QQuickWindowCapture(QObject *parent) : QWindowCapture(parent)
9
{}
10
11
/*!
12
\since 6.12
13
\qmlproperty real QtMultimedia::WindowCapture::maximumFrameRate
14
15
The window capture frame rate upper limit.
16
17
This can be set to override the capture frame rate used by default based on
18
e.g. display refresh rate, but only as an upper limit since window capture
19
produces frames at a variable rate. Setting this higher than the display
20
refresh rate is not recommended and can cause errors.
21
22
If -1, a platform-dependent default is used.
23
24
Any changes to this property are applied the next time the WindowCapture
25
goes active.
26
*/
27
28
void
QQuickWindowCapture::qmlSetMaximumFrameRate(qreal frameRate)
29
{
30
if
(qFuzzyCompare(frameRate,
static_cast
<qreal>(-1.f)))
31
setMaximumFrameRate(std::nullopt);
32
else
if
(frameRate > 0.f)
33
setMaximumFrameRate(frameRate);
34
}
35
36
qreal QQuickWindowCapture::qmlMaximumFrameRate()
const
37
{
38
return
maximumFrameRate().value_or(-1.f);
39
}
40
41
QT_END_NAMESPACE
42
43
#
include
"moc_qquickwindowcapture_p.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
multimediaquick
qquickwindowcapture.cpp
Generated on
for Qt by
1.16.1