QCapturableWindow Class
用于获取可捕获窗口的基本信息。更多
头文件: | #include <QCapturableWindow> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Multimedia) target_link_libraries(mytarget PRIVATE Qt6::Multimedia) |
qmake: | QT += multimedia |
自 | Qt 6.6 |
在 QML 中: | CapturableWindow |
公共函数
QCapturableWindow() | |
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) |
详细说明
该类包含一组窗口信息,但QCapturableWindow::isValid 方法除外,该方法会在调用时提取当前状态。
另请参阅 QWindowCapture 。
成员函数文档
QCapturableWindow::QCapturableWindow()
构造一个不指向任何窗口的空可捕获窗口信息。
QCapturableWindow::QCapturableWindow(const QCapturableWindow &other)
使用other QCapturableWindow 构建新窗口信息。
[noexcept]
QCapturableWindow::QCapturableWindow(QCapturableWindow &&other)
从other 移动构造一个 QCapturableWindow。
[noexcept]
QCapturableWindow::~QCapturableWindow()
销毁窗口信息。
QString QCapturableWindow::description() const
返回窗口的描述。在大多数情况下,它代表窗口标题。
注: 属性描述的获取函数。
bool QCapturableWindow::isValid() const
标识窗口信息是否有效。
无效的窗口信息指的是不存在的窗口或不指向任何窗口。
如果窗口有效,则返回 true;如果无效,则返回 false。
注: 属性 isValid 的获取函数。
[noexcept]
void QCapturableWindow::swap(QCapturableWindow &other)
将当前窗口信息与other 互换。
[noexcept]
QCapturableWindow &QCapturableWindow::operator=(QCapturableWindow &&other)
将other 移至QCapturableWindow 。
QCapturableWindow &QCapturableWindow::operator=(const QCapturableWindow &other)
将other 窗口信息分配给此QCapturableWindow 。
相关非会员
[noexcept]
bool operator!=(const QCapturableWindow &lhs, const QCapturableWindow &rhs)
如果窗口信息lhs 和rhs 指向不同的窗口,则返回true
,否则返回false
。
[noexcept]
bool operator==(const QCapturableWindow &lhs, const QCapturableWindow &rhs)
如果窗口信息lhs 和rhs 指向同一个窗口,则返回true
,否则返回false
。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.