QCapturableWindow Class
Permet d'obtenir les informations de base d'une fenêtre pouvant être capturée. En savoir plus...
| 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
- description : const QString
- isValid : const bool
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) |
Personnes extérieures concernées
| 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 la fenêtre, à l'exception de la méthode QCapturableWindow::isValid qui récupère l'état actuel à chaque fois qu'elle est appelée.
Voir aussi 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 correspond au 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.
Des informations de fenêtre non valides font référence à une fenêtre inexistante ou ne font référence à aucune fenêtre en particulier.
Fonctions d'accès :
| bool | isValid() const |
Documentation sur les fonctions membres
QCapturableWindow::QCapturableWindow()
Crée des informations de fenêtre « capturable » de type null qui ne font référence à aucune fenêtre.
[explicit invokable, since 6.10] QCapturableWindow::QCapturableWindow(QWindow *window)
Crée une instance de QCapturableWindow correspondant à la fenêtre indiquée.
La description de la QCapturableWindow correspondra au titre de l'QWindow fournie.
Remarque : le constructeur peut créer une instance non valide si l'QWindow spécifiée n'a pas encore été affichée. Ainsi, si l'application Qt n'est pas en cours d'exécution, on s'attend à obtenir une instance non valide de « QCapturableWindow ». La validité de l'instance peut être vérifiée en interrogeant « isValid » au fil du temps.
Si un `nullptr` est fourni en entrée, cette méthode renverra une instance qui ne deviendra jamais valide.
Si une fenêtre qui n’est pas de niveau supérieur est fournie, cette méthode renverra une instance qui ne deviendra jamais valide.
Remarque : cette fonction peut être appelée via le système de méta-objets et depuis QML. Voir Q_INVOKABLE.
Cette fonction a été introduite dans Qt 6.10.
QCapturableWindow::QCapturableWindow(const QCapturableWindow &other)
Créez une nouvelle fenêtre d'informations à l'aide de ` other QCapturableWindow`.
[constexpr noexcept default] QCapturableWindow::QCapturableWindow(QCapturableWindow &&other)
Crée un objet `QCapturableWindow` à partir de ` other`.
[noexcept] QCapturableWindow::~QCapturableWindow()
Supprime les informations relatives à la fenêtre.
[noexcept] void QCapturableWindow::swap(QCapturableWindow &other)
Permute les informations de la fenêtre actuelle avec celles de other.
[noexcept] QCapturableWindow &QCapturableWindow::operator=(QCapturableWindow &&other)
Déplace « other » vers cette adresse : QCapturableWindow.
QCapturableWindow &QCapturableWindow::operator=(const QCapturableWindow &other)
Attribue les informations de la fenêtre « other » à cette QCapturableWindow.
Contenu connexe pour les non-membres
[noexcept] bool operator!=(const QCapturableWindow &lhs, const QCapturableWindow &rhs)
Renvoie « true » si les informations sur les fenêtres « lhs » et « rhs » font référence à 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 font référence à 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.