parent
ad9305e422
commit
c3e3f4e53f
@ -0,0 +1,35 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import I.hate.dictators 1.0
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
required property CountryType country
|
||||||
|
|
||||||
|
color: "lightgrey"
|
||||||
|
|
||||||
|
Column {
|
||||||
|
width: parent.width
|
||||||
|
Image {
|
||||||
|
id: choosenFlag
|
||||||
|
source: country?'qrc:/assets/flags/'+country.iso+'.svg':''
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
width: parent.width
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: nameText
|
||||||
|
text: country ? country.name : ""
|
||||||
|
font.pixelSize: 50
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: country ? country.capital : ""
|
||||||
|
font.pixelSize: nameText.font.pixelSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: country ? country.region : ""
|
||||||
|
font.pixelSize: nameText.font.pixelSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue