Sur cette page

QCapturableWindow Class

Permet d'obtenir les informations de base d'une fenêtre capturable. Plus d'informations...

En-tête : #include <QCapturableWindow>
CMake : find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)
qmake : QT += multimedia
Depuis : Qt 6.6
En QML : CapturableWindow

Propriétés

Fonctions publiques

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)

Description détaillée

La classe contient un ensemble d'informations sur les fenêtres, à l'exception de la méthode QCapturableWindow::isValid qui extrait l'état actuel à chaque fois qu'elle est appelée.

Voir également QWindowCapture.

Documentation sur les propriétés

[read-only] description : const QString

Cette propriété contient une description de la fenêtre.

Dans la plupart des cas, elle représente le titre de la fenêtre.

Fonctions d'accès :

QString description() const

[read-only] isValid : const bool

Cette propriété indique si les informations relatives à la fenêtre sont valides.

Une information sur une fenêtre non valide renvoie à une fenêtre inexistante ou ne renvoie à aucune fenêtre.

Fonctions d'accès :

bool isValid() const

Documentation des fonctions membres

QCapturableWindow::QCapturableWindow()

Construit une information de fenêtre capturable nulle qui ne fait référence à aucune fenêtre.

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

Construit une instance de QCapturableWindow qui correspond à la fenêtre donnée.

La description de la QCapturableWindow correspondra au titre de la fenêtre donnée QWindow.

Notez que le constructeur peut créer une instance invalide si l'adresse QWindow spécifiée n'a pas encore été présentée. Ainsi, si l'application Qt XML n'est pas en cours d'exécution, une instance QCapturableWindow invalide est attendue. La validité de l'instance peut être suivie en interrogeant isValid au fil du temps.

Si elle reçoit un nullptr en entrée, cette méthode renverra une instance qui ne sera jamais valide.

Si elle reçoit une fenêtre qui n'est pas de niveau supérieur, cette méthode renverra une instance qui ne sera jamais valide.

Remarque : cette fonction peut être invoquée via le système de méta-objets et à partir de QML. Voir Q_INVOKABLE.

Cette fonction a été introduite dans Qt 6.10.

QCapturableWindow::QCapturableWindow(const QCapturableWindow &other)

Construire une nouvelle information de fenêtre en utilisant other QCapturableWindow.

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

Construit une QCapturableWindow en se déplaçant de other.

[noexcept] QCapturableWindow::~QCapturableWindow()

Détruit les informations de la fenêtre.

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

Remplace les informations de la fenêtre actuelle par celles de other.

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

Déplace other dans QCapturableWindow.

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

Attribue les informations de la fenêtre other à cette QCapturableWindow.

Non-membres apparentés

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

Renvoie true si les informations sur les fenêtres lhs et rhs se réfèrent à des fenêtres différentes, sinon renvoie false.

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

Renvoie true si les informations sur la fenêtre lhs et rhs se réfèrent à la même fenêtre, sinon renvoie 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.