blob: b7d310e2f50db39faf19c4f360af17a38a9fa352 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
import QtQuick
import QtQuick.Controls
import QtQuick.Window
Flickable {
id: flickable
width: 200
height: 200
contentWidth: width
contentHeight: column.height
// Will center activeFocusItem in the Flickable every time it changes
property Item activeFocusItem: Window.activeFocusItem
onActiveFocusItemChanged: flickable.positionViewAtChild(activeFocusItem, Flickable.AlignCenter)
Column {
id: column
spacing: 10
Repeater {
model: 10
TextArea {}
}
}
}
//![0]
|