summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-21 17:39:42 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-02 10:23:39 +0100
commit62f86b9b7ab3421c7a74c4c05a186847c76bfb28 (patch)
tree3922cf4ecb5d0f093dee5807185cdc82695556ba /examples
parent2efc1cd6aa2f9a4797ba22fcde8acf1fa7e777d1 (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 MouseMove events to set an explicit hovered state only when the mouse hits the button. Use that state to initialize the style option if mouseTracking is on, otherwise no change of behavior. Fixes: QTBUG-87706 Change-Id: I2f423b760c85cfab9faac4be44a5c7dcf2ba1c23 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> (adapted from 3310e13a17d2249a86fa533e350744c5593be54f by including fd8e6a203ecfeebc03772b3bce14c91a6fc0a8e1)
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions