faae3dc6b1
QAbstractItemView installs the delegate as an event filter on the editor, so the delegate will get the focusOut event (and other events) before the editor does. QAbstractItemDelegate will then emit commitData, signaling that the "updated" data should be written back to the model. In the case where the editor of a delegate (QAbstractItemDelegate) is a QSpinBox with keyboardTracking set to false, the value of the spinbox won't be updated while typing, but only when the spinbox's text edit focus is lost. In this case, the delegate's commitData will be emitted before the spinbox has had a chance to update the value in its handling of the focusOut event. To fix, make sure to update the value before the data is committed to the model in the delegate's tryFixup method. Fixes: QTBUG-116926 Pick-to: 6.5 6.6 Change-Id: I68540964342407d23387e4404a0fe3f00d80eb5f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> |
||
---|---|---|
.. | ||
auto | ||
baseline | ||
benchmarks | ||
global | ||
libfuzzer | ||
manual | ||
shared | ||
testserver | ||
CMakeLists.txt | ||
README |
This directory contains autotests and benchmarks based on Qt Test. In order to run the autotests reliably, you need to configure a desktop to match the test environment that these tests are written for. Linux X11: * The user must be logged in to an active desktop; you can't run the autotests without a valid DISPLAY that allows X11 connections. * The tests are run against a KDE3 or KDE4 desktop. * Window manager uses "click to focus", and not "focus follows mouse". Many tests move the mouse cursor around and expect this to not affect focus and activation. * Disable "click to activate", i.e., when a window is opened, the window manager should automatically activate it (give it input focus) and not wait for the user to click the window.