Advertisement
Guest User

Untitled

a guest
Apr 20th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.65 KB | None | 0 0
  1. import QtQuick 2.6
  2. import QtQuick.Window 2.2
  3. import QtQuick.Controls 2.1
  4. import QtQuick.Layouts 1.1
  5.  
  6. Window {
  7.     visible: true
  8.     width: 640
  9.     height: 480
  10.     title: qsTr("Hello World")
  11.  
  12.  
  13.  
  14.     ListView {
  15.          model: myModel
  16.          width: parent.width
  17.          height: 400
  18.          id: list_id
  19.          delegate: Rectangle{
  20.              MouseArea{
  21.                  anchors.fill: parent
  22.              }
  23.  
  24.              anchors.left: parent.left
  25.              anchors.right: parent.right
  26.              anchors.margins: 10
  27.              height: 90
  28.              width: parent.width
  29.              color: "red"
  30.              visible: true
  31.              clip: true
  32.              ColumnLayout{
  33.                  spacing: 2
  34.                  Label{
  35.                      text: index
  36.                  }
  37.  
  38.                  Label{
  39.                      text: toUser
  40.                  }
  41.                  Label{
  42.                      text: fromUser
  43.                  }
  44.                  Label{
  45.                      text: topic
  46.                  }
  47.                  Label{
  48.                      text: content
  49.                  }
  50.                  Image {
  51.                      id: url
  52.                      source: imageURL
  53.                  }
  54.              }
  55.  
  56.              Rectangle{
  57.                  width: parent.width
  58.                  height: parent.height
  59.                  anchors.margins: 5
  60.                  color: "lightsteelblue"
  61.  
  62.              }
  63.  
  64.  
  65.              }
  66.  
  67.         }
  68.     }
  69.  
  70.     Text {
  71.         id: content
  72.         text: qsTr(content)
  73.         Rectangle{
  74.             parent: parent.width
  75.             height: parent.height
  76.         }
  77.     }
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement