Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.12
- import QtQuick.Controls 2.4
- import QtQuick.Window 2.11
- import QtQuick.Dialogs 1.2
- ApplicationWindow {
- id: root
- visible: true
- width: 640
- height: 480
- title: qsTr("Hello World")
- Button {
- id: chooseButton
- anchors.centerIn: parent
- text: "Select file";
- FileDialog {
- id: fileChoose
- onAccepted: {
- result.text = fileUrl
- chooseButton.visible = false
- }
- }
- onClicked: {
- fileChoose.open()
- }
- }
- TextArea {
- id: result
- visible: !chooseButton.visible
- width: parent.width/2
- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
- height: parent.height/2
- anchors.centerIn: parent
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement