Kstars

KSTab.qml
1 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
2 // SPDX-License-Identifier: GPL-2.0-or-later
3 
4 import QtQuick 2.6
5 import QtQuick.Layouts 1.2
6 import QtQuick.Controls 2.0
7 import "../constants" 1.0
8 
9 Pane {
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-2022 The KDE developers.
Generated on Sat Aug 13 2022 04:01:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.