diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-21 17:39:42 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-22 02:43:40 +0200 |
commit | 3310e13a17d2249a86fa533e350744c5593be54f (patch) | |
tree | 610feb59ccde7fd855ae6e35a9f07c8a67c4f9e3 /src/widgets/widgets/qdockarealayout_p.h | |
parent | 875a7fad52e88a86eb963b534e9a7c3e27d7e7ce (diff) |
Don't show QPushButton as hovered unless the mouse is within the bevel
Previous fixes made QPushButton correctly respect the style sheet boxing
model (as it's documented to do), ignoring clicks that were within the
margin area of the button (ie outside the bevel). However, a hover state
selector in the style sheet would still be used for the entire widget.
Turn on mouse tracking for widgets that have a hover state selector, and
handle mouseMoveEvent to set an explicit hovered state only when the mouse
hits the button. Use that state to initialize the style option.
Fixes: QTBUG-87706
Change-Id: I2f423b760c85cfab9faac4be44a5c7dcf2ba1c23
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qdockarealayout_p.h')
0 files changed, 0 insertions, 0 deletions