In questa pagina

QCapturableWindow Class

Utilizzato per ottenere le informazioni di base relative a una finestra catturabile. Maggiori informazioni...

Intestazione: #include <QCapturableWindow>
CMake: find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)
qmake: QT += multimedia
A partire da: Qt 6.6
In QML: CapturableWindow

Proprietà

Funzioni pubbliche

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)

Descrizione dettagliata

La classe contiene una serie di informazioni relative alla finestra, ad eccezione del metodo QCapturableWindow::isValid, che recupera lo stato corrente ogni volta che viene chiamato.

Vedi anche QWindowCapture.

Documentazione delle proprietà

[read-only] description : const QString

Questa proprietà contiene una descrizione della finestra.

Nella maggior parte dei casi rappresenta il titolo della finestra.

Funzioni di accesso:

QString description() const

[read-only] isValid : const bool

Questa proprietà indica se le informazioni relative alla finestra sono valide.

Un'informazione non valida sulla finestra si riferisce a una finestra inesistente o non si riferisce a nessuna in particolare.

Funzioni di accesso:

bool isValid() const

Documentazione sulle funzioni membro

QCapturableWindow::QCapturableWindow()

Crea un'informazione di finestra "null" catturabile che non fa riferimento ad alcuna finestra.

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

Crea un’istanza di QCapturableWindow associata alla finestra specificata.

La descrizione di QCapturableWindow corrisponderà al titolo dell'QWindow specificato.

Si noti che il costruttore potrebbe creare un'istanza non valida se l'QWindow specificata non è stata ancora visualizzata. Pertanto, se l'applicazione Qt non è in esecuzione, ci si aspetta un'istanza QCapturableWindow non valida. La validità dell'istanza può essere monitorata interrogando isValid nel corso del tempo.

Se viene fornito un `nullptr` come input, questo metodo restituirà un’istanza che non diventerà mai valida.

Se viene fornita una finestra che non è di primo livello, questo metodo restituirà un'istanza che non diventerà mai valida.

Nota: questa funzione può essere richiamata tramite il sistema dei meta-oggetti e da QML. Vedi Q_INVOKABLE.

Questa funzione è stata introdotta in Qt 6.10.

QCapturableWindow::QCapturableWindow(const QCapturableWindow &other)

Crea una nuova finestra informativa utilizzando ` other QCapturableWindow`.

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

Crea un oggetto `QCapturableWindow` a partire da un oggetto ` other`.

[noexcept] QCapturableWindow::~QCapturableWindow()

Elimina le informazioni relative alla finestra.

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

Scambia le informazioni sulla finestra corrente con quelle di other.

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

Sposta other in questo QCapturableWindow.

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

Assegna le informazioni della finestra “ other ” a questo “ QCapturableWindow ”.

Correlati (non membri)

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

Restituisce ` true ` se le informazioni sulle finestre ` lhs ` e ` rhs ` si riferiscono a finestre diverse; in caso contrario, restituisce ` false`.

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

Restituisce ` true ` se le informazioni sulla finestra ` lhs ` e ` rhs ` si riferiscono alla stessa finestra; in caso contrario, restituisce ` 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.