Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.1
- import QtQuick.Controls 1.0
- Rectangle {
- signal clicked
- property string title
- property string message1
- property string message2
- id: dialog
- anchors.fill: parent
- color: Qt.rgba(0, 0, 0, 0.5);
- function show()
- {
- dialog.visible = true;
- }
- function hide()
- {
- dialog.visible = false;
- }
- MouseArea {
- anchors.fill: dialog
- onClicked: {
- dialog.clicked();
- }
- }
- Rectangle {
- color: "#4fa46b"
- height: parent.height/2
- width: parent.width/2
- anchors.centerIn: parent
- border.width: 5
- border.color: "#2e5f3e"
- ScrollView {
- id: scroll
- anchors.fill: parent
- anchors.margins: 24
- Column {
- spacing: 20
- Text {
- color: 'white'
- text: dialog.title
- width: scroll.width
- wrapMode: Text.WordWrap
- font {
- pointSize: 22
- bold: true
- }
- }
- Text {
- color: 'white'
- text: dialog.message1
- width: scroll.width
- wrapMode: Text.WordWrap
- font.pointSize: 12
- }
- Text {
- color: 'white'
- text: dialog.message2
- width: scroll.width
- wrapMode: Text.WordWrap
- font.pointSize: 12
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement