Used for getting the basic information of a capturable window. 更多...
| 头: |
#include <QCapturableWindow>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)
|
| qmake: |
QT += multimedia
|
| Since: | Qt 6.6 |
| 在 QML: | CapturableWindow |
| QCapturableWindow () | |
(从 6.10 起)
|
QCapturableWindow (QWindow * window ) |
| QCapturableWindow (const QCapturableWindow & other ) | |
| QCapturableWindow (QCapturableWindow && other ) | |
| ~QCapturableWindow () | |
| QString | description () const |
| bool | isValid () const |
| void | swap (QCapturableWindow & other ) |
| QCapturableWindow & | operator= (QCapturableWindow && other ) |
| QCapturableWindow & | operator= (const QCapturableWindow & other ) |
| bool | operator!= (const QCapturableWindow & lhs , const QCapturableWindow & rhs ) |
| bool | operator== (const QCapturableWindow & lhs , const QCapturableWindow & rhs ) |
The class contains a set of window information, except the method QCapturableWindow::isValid which pulls the current state whenever it's called.
另请参阅 QWindowCapture .
[read-only]
description
: const
QString
This property holds a description of the window.
In most cases it represents the window title.
访问函数:
| QString | 描述 () const |
[read-only]
isValid
: const
bool
This property holds whether information about the window is valid.
An invalid window information refers to non-existing window or doesn't refer to any one.
访问函数:
| bool | isValid () const |
Constructs a null capturable window information that doesn't refer to any window.
[explicit invokable, since 6.10]
QCapturableWindow::
QCapturableWindow
(
QWindow
*
window
)
Constructs a QCapturableWindow instance that maps to the given window.
The description of the QCapturableWindow will match the title of the given QWindow .
Note, the constructor may create an invalid instance if the specified
QWindow
has not been presented yet. Thus, if the Qt application is not running, an invalid
QCapturableWindow
instance is expected. The validity of the instance can be tracked by querying
isValid
over time.
If given a nullptr as input, this method will return an instance that will never become valid.
If given a window that is not top-level, this method will return an instance will never become valid.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
该函数在 Qt 6.10 引入。
Construct a new window information using other QCapturableWindow.
[noexcept]
QCapturableWindow::
QCapturableWindow
(
QCapturableWindow
&&
other
)
Constructs a QCapturableWindow by moving from other .
[noexcept]
QCapturableWindow::
~QCapturableWindow
()
Destroys the window information.
[noexcept]
void
QCapturableWindow::
swap
(
QCapturableWindow
&
other
)
Swaps the current window information with other .
[noexcept]
QCapturableWindow
&QCapturableWindow::
operator=
(
QCapturableWindow
&&
other
)
移动 other 到此 QCapturableWindow .
赋值 other window information to this QCapturableWindow .
[noexcept]
bool
operator!=
(const
QCapturableWindow
&
lhs
, const
QCapturableWindow
&
rhs
)
返回
true
if window information
lhs
and
rhs
refer to different windows, otherwise returns
false
.
[noexcept]
bool
operator==
(const
QCapturableWindow
&
lhs
, const
QCapturableWindow
&
rhs
)
返回
true
if window information
lhs
and
rhs
refer to the same window, otherwise returns
false
.