Skip to content

Instantly share code, notes, and snippets.

@ahmad88me
Created August 6, 2017 11:43
Show Gist options
  • Save ahmad88me/1cf66f701e96011773c69dba5e3d1ab1 to your computer and use it in GitHub Desktop.
Save ahmad88me/1cf66f701e96011773c69dba5e3d1ab1 to your computer and use it in GitHub Desktop.
import QtQuick 2.0
Column{
property string username
property string img
width: parent.width
Rectangle{
color: "white"
height: 60
width: parent.width
CircularImage{
id: single_post_avatar
source: "images/mickey.png"
height: parent.height * 0.7
width: height
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 9
}
Text{
text: username
anchors.verticalCenter: parent.verticalCenter
anchors.left: single_post_avatar.right
anchors.leftMargin: 9
font.pointSize: 15
}
Rectangle{
height: 1
width: parent.width
color: "#dddddd"
anchors.bottom: parent.bottom
}
Image{
source: "images/more.png"
anchors.right: parent.right
anchors.rightMargin: 9
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
height: parent.height * 0.6
width: height
}
}
Image{
source: img
width: parent.width
height: width
}
Rectangle{
color: "white"
width: parent.width
height: 60
Image{
id: single_post_heart
source: "images/heart.png"
height: parent.height * 0.4
width: height
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 9
fillMode: Image.PreserveAspectFit
}
Image{
id: single_post_comment
source: "images/comment.png"
height: parent.height * 0.4
width: height
anchors.verticalCenter: parent.verticalCenter
anchors.left: single_post_heart.right
anchors.leftMargin: 18
}
Image{
id: single_post_share
source: "images/forward.png"
height: parent.height * 0.4
width: height
anchors.verticalCenter: parent.verticalCenter
anchors.left: single_post_comment.right
anchors.leftMargin: 18
}
Rectangle{
height: 1
width: parent.width -18
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
color: "#dddddd"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment