Advertisement
Guest User

Fixed 2 example

a guest
Jan 21st, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.53 KB | None | 0 0
  1. import QtQuick 2.13
  2.  
  3. ListView {
  4.   id: _listView
  5.  
  6.   property string text // Пользовательское значение
  7.  
  8.   anchors.fill: parent
  9.   model: test_model
  10.   delegate: Internal {}
  11.  
  12.   ListModel {
  13.     id: test_model
  14.     ListElement {name: "first"}
  15.     ListElement {name: "second"}
  16.   }
  17. }
  18.  
  19. // Internal.qml
  20. import QtQuick 2.13
  21. import QtQuick.Controls 2.13
  22.  
  23. Rectangle {
  24.   height: 28
  25.   width: parent.width
  26.   Label {
  27.     property string text: _listView.text != "" ? _listView.text : "default"
  28.   }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement