Before this patch, we did not set the view item positions in the views. This was fine as they were ignored until b780eaf6a063a7efe03417cf6b7008a188e222a4 added a condition to early exit on invalid positions. This then broke all qss background styling using QStyleOptionViewItem::ViewItemPosition as they were always invalid. Set the position when trying to draw a cell of the view before reaching the code handling the qss rules for backgrounds. Fixes: QTBUG-137346 Pick-to: 6.8 Change-Id: I83d7a3ea7b9bab98889791bb807988a74e355b93 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 5aa1bc46217dc6f53fde8fe17608cf0e5f7a5e78) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit da9ac3bf1d2c2d7259563918f5e665d421957ec5)
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.