import QtQuick 2.0 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 Dialog { id: control property string _shareUrl parent: Overlay.overlay x: (parent.width - width) * 0.5 y: (parent.height - height) * 0.5 modal: true title: "Share these results" contentItem: RowLayout { Repeater { id: buttonRepeater property var buttons: [ ["\uf0c1", "Link", serverConn.shareResultsAsUrl], ["\uf029", "QR-code", null], ["\uf1c1", "Poster", serverConn.shareResultsAsPoster], ] model: buttons delegate: Button { flat: true font.family: fa5solid.name text: "" + modelData[0] + "

" + modelData[1] + " " onClicked: buttonRepeater.buttons[index][2](_shareUrl) } } } function appear(shareUrl) { _shareUrl = shareUrl control.open() } }