Nesta página

QCapturableWindow Class

Utilizado para obter as informações básicas de uma janela capturável. Mais...

Cabeçalho: #include <QCapturableWindow>
CMake: find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)
qmake: QT += multimedia
Desde: Qt 6.6
No QML: CapturableWindow

Propriedades

Funções públicas

QCapturableWindow()
(since 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)

Descrição detalhada

A classe contém um conjunto de informações sobre a janela, exceto o método ` QCapturableWindow::isValid `, que obtém o estado atual sempre que é chamado.

Veja também ` QWindowCapture`.

Documentação da propriedade

[read-only] description : const QString

Essa propriedade contém uma descrição da janela.

Na maioria dos casos, ela representa o título da janela.

Funções de acesso:

QString description() const

[read-only] isValid : const bool

Essa propriedade indica se as informações sobre a janela são válidas.

Uma informação inválida sobre a janela refere-se a uma janela inexistente ou não se refere a nenhuma em particular.

Funções de acesso:

bool isValid() const

Documentação das funções de membro

QCapturableWindow::QCapturableWindow()

Cria uma informação de janela capturável nula que não se refere a nenhuma janela.

[explicit invokable, since 6.10] QCapturableWindow::QCapturableWindow(QWindow *window)

Cria uma instância de QCapturableWindow que corresponde à janela especificada.

A descrição da `QCapturableWindow` corresponderá ao título do ` QWindow` fornecido.

Observe que o construtor pode criar uma instância inválida se o ` QWindow ` especificado ainda não tiver sido exibido. Portanto, se o aplicativo Qt não estiver em execução, é esperado que a instância de ` QCapturableWindow ` seja inválida. A validade da instância pode ser acompanhada consultando-se ` isValid ` ao longo do tempo.

Se for fornecido um `nullptr` como entrada, este método retornará uma instância que nunca se tornará válida.

Se for fornecida uma janela que não seja de nível superior, este método retornará uma instância que nunca se tornará válida.

Observação: Esta função pode ser invocada por meio do sistema de metaobjetos e a partir do QML. Consulte Q_INVOKABLE.

Esta função foi introduzida no Qt 6.10.

QCapturableWindow::QCapturableWindow(const QCapturableWindow &other)

Crie uma nova janela de informações usando ` other QCapturableWindow`.

[constexpr noexcept default] QCapturableWindow::QCapturableWindow(QCapturableWindow &&other)

Cria uma instância de `QCapturableWindow` a partir de ` other`.

[noexcept] QCapturableWindow::~QCapturableWindow()

Exclui as informações da janela.

[noexcept] void QCapturableWindow::swap(QCapturableWindow &other)

Troca as informações da janela atual por um other.

[noexcept] QCapturableWindow &QCapturableWindow::operator=(QCapturableWindow &&other)

Muda other para este endereço: QCapturableWindow.

QCapturableWindow &QCapturableWindow::operator=(const QCapturableWindow &other)

Atribui as informações da janela “ other ” a este “ QCapturableWindow ”.

Não-membros relacionados

[noexcept] bool operator!=(const QCapturableWindow &lhs, const QCapturableWindow &rhs)

Retorna ` true ` se as informações das janelas ` lhs ` e ` rhs ` se referirem a janelas diferentes; caso contrário, retorna ` false`.

[noexcept] bool operator==(const QCapturableWindow &lhs, const QCapturableWindow &rhs)

Retorna ` true ` se as informações da janela ` lhs ` e ` rhs ` se referirem à mesma janela; caso contrário, retorna ` false`.

© 2026 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.