The fix for QTBUG-133332 introduced a check to avoid an endless
recursion within setStyle_helper() but it prevents the correct
propagation of the style with a descendant selector. Therefore use
another approach and make sure QWidgetPrivate::inheritStyle() is not
called recursivly.
This amends 3252e1808c.
Pick-to: 6.10 6.9
Task-number: QTBUG-133332
Fixes: QTBUG-139924
Change-Id: Ia0a1eec652380397f861364bbdc303dfd17b34f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>