Qt::NoFocus policy for the scrollarea, that usually has no scrollbars

This commit is contained in:
Uwe Rathmann 2023-07-21 12:59:50 +02:00
parent 4270b0f7ba
commit e9ed10ac82
1 changed files with 8 additions and 0 deletions

View File

@ -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 );