From e9ed10ac82597fd15de57dbfb1f078fbc56496c1 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Fri, 21 Jul 2023 12:59:50 +0200 Subject: [PATCH] Qt::NoFocus policy for the scrollarea, that usually has no scrollbars --- examples/gallery/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/gallery/main.cpp b/examples/gallery/main.cpp index fd2f41ad..b074c299 100644 --- a/examples/gallery/main.cpp +++ b/examples/gallery/main.cpp @@ -100,6 +100,14 @@ namespace auto scrollArea = new QskScrollArea(); scrollArea->setMargins( 5 ); +#if 1 + /* + We need a mode, where the focus policy gets adjusted + when a scroll bar becomes visible. TODO ... + */ + scrollArea->setFocusPolicy( Qt::NoFocus ); +#endif + // hiding the viewport scrollArea->setGradientHint( QskScrollView::Viewport, QskGradient() ); scrollArea->setBoxShapeHint( QskScrollView::Viewport, 0 );