Kstars

KSTab.qml
1// SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4import QtQuick 2.6
5import QtQuick.Layouts 1.2
6import QtQuick.Controls 2.0
7import "../constants" 1.0
8
9Pane {
10 id: tab
11 property string title: ""
12 clip: true
13 property Item flickableItem: flickable
14 padding: 0
15
16 background: Rectangle {
17 color: Num.sysPalette.base
18 }
19
20 //contentItem is already used by Pane so be it rootItem
21 property Item rootItem
22
23 onRootItemChanged: {
24 if(rootItem.parent != flickable.contentItem) rootItem.parent = flickable.contentItem
25 }
26
27 Flickable {
28 id: flickable
29 anchors{
30 fill: parent
31 margins: Num.marginsKStab
32 }
33 ScrollBar.vertical: ScrollBar { id: scrollBar }
34 flickableDirection: Flickable.VerticalFlick
35 contentWidth: rootItem != undefined ? rootItem.width : 0
36 contentHeight: rootItem != undefined ? rootItem.height : 0
37 flickableChildren: rootItem
38 }
39}
This qml code implements a vertical scrollbar which shall be displayed in listview of sky-objects.
Definition ScrollBar.qml:9
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.