Plasma

ScrollArea.qml
1 /*
2  SPDX-FileCopyrightText: 2014 David Edmundson <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 import QtQuick 2.2
8 import QtQuick.Controls 1.1 as QtQuickControls
9 import QtQuick.Controls.Styles.Plasma 2.0 as Styles
10 
11 /**
12  * This item takes a Flickable and automatically puts scrollbars in adjusting
13  * the layout if needed. The scrollbars will be interactive or not, depending
14  * on the platform. If flickableItem is a categorized ListView the vertical
15  * scrollbar will be a SectionScroller.
16  *
17  * See QtControls.ScrollView for full API
18  * @deprecated since 5.83, use PlasmaComponents3.ScrollView instead
19  */
20 
21 QtQuickControls.ScrollView {
22  id: root
23 
24  style: Styles.ScrollViewStyle{}
25  frameVisible: true
26  activeFocusOnTab: false
27 
28  //START HACK
29  //The following is a workaround for QTBUG-17051
30  //Scrollview disables interactive property on the listview for non-touch screen devices
31  //which would make sense except this also breaks keyboard interaction which is a worse problem
32 
33  //this is fixed in 5.7 where interactive is split into two properties
34 
35  onContentItemChanged: {
36  if (contentItem.interactive !== undefined) {
37  contentItem.interactive = true;
38  }
39  contentItem.focus = true
40  }
41  //we want plasmoid popups open as quick as possible at start.
42  //this makes sure things with big list views (kickoff, clipboard)
43  //are loaded when created, even before they are shown
44  Component.onCompleted: {
45  if (typeof contentItem.forceLayout === "function") {
46  contentItem.forceLayout();
47  }
48  console.warn("PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead.")
49  }
50  //end hack
51 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:07:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.