QGraphicsSceneHelpEvent Class
La classe `QGraphicsSceneHelpEvent` génère des événements lorsqu'une info-bulle est demandée. En savoir plus...
| En-tête : | #include <QGraphicsSceneHelpEvent> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake : | QT += widgets |
| Hérite de : | QGraphicsSceneEvent |
Fonctions publiques
| virtual | ~QGraphicsSceneHelpEvent() |
| QPointF | scenePos() const |
| QPoint | screenPos() const |
Description détaillée
Lorsqu'un « QGraphicsView » reçoit une « QEvent » de type « QEvent::ToolTip », il crée un « QGraphicsSceneHelpEvent », qui est transmis à la scène. Vous pouvez définir une info-bulle sur un « QGraphicsItem » à l'aide de « setToolTip() » ; par défaut, « QGraphicsScene » affiche l'info-bulle de l'« QGraphicsItem » ayant la valeur z la plus élevée (c'est-à-dire l'élément le plus en haut) sous la position de la souris.
QGraphicsView Ne transmet pas les événements lorsque l'aide est demandée via "What's This" et status tip. Si vous en avez besoin, vous pouvez réimplémenter QGraphicsView::viewportEvent() et transmettre les événements QStatusTipEvent et QEvents de type QEvent::WhatsThis à la scène.
Voir également QEvent.
Documentation des fonctions membres
[virtual noexcept] QGraphicsSceneHelpEvent::~QGraphicsSceneHelpEvent()
Supprime l'événement.
QPointF QGraphicsSceneHelpEvent::scenePos() const
Renvoie la position du curseur de la souris dans les coordonnées de la scène au moment où l'événement d'aide a été envoyé.
Voir également screenPos().
QPoint QGraphicsSceneHelpEvent::screenPos() const
Renvoie la position du curseur de la souris en coordonnées d'écran au moment où l'événement d'aide a été envoyé.
Voir également scenePos().
© 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.