i have following qml, , trying add scrollview around listview:
import qtquick 2.7 import qtquick.controls 2.0 // works if 1.4 specified import qtquick.layouts 1.0 item { width: 600 height: 400 property alias textoutput_listview: textoutput_listview property alias dooffsetgaincal_button: dooffsetgaincal_button button { id: dooffsetgaincal_button x: 40 y: 38 text: "do offset/gain cal" } scrollview { listview { id: textoutput_listview x: 40 y: 99 width: 300 height: 256 model: textoutputlistmodel delegate: rectangle { x: 0 y: 0 width: 100 height:18 text { text: modeldata } } rectangle { id: rectangle2 color: "#ffffffff" visible: true z: 1 anchors.fill: parent border.color: "#7d7d7d" opacity: 0.2 } } } }
however, if import qtquick.controls 2.0, scrollview reported 'not type'. if import 1.4 works.
googling has not indicated scrollview has been deprecated or replaced.
am wrong in expectation versions of qml components replace older ones - meaning supposed import 2.0 , 1.4?
scrollview
has been introduced in qt quick controls 2.2 in qt 5.9. provides flicking , non-interactive scroll indicators on touch, , switches interactive scroll bars , disables flicking when interacted mouse pointer.
Comments
Post a Comment