Last active
August 29, 2015 14:04
-
-
Save Kakadu/4e11ec3e82b485932497 to your computer and use it in GitHub Desktop.
Demo for opening a dialog. I can't set initial directory for the fialog. Is it a bug?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.1 | |
import QtQuick.Controls 1.0 | |
import QtQuick.Layouts 1.0 | |
import QtQuick.Dialogs 1.0 | |
ApplicationWindow { | |
width: 640 | |
height: 480 | |
FileDialog { | |
id: theFileDialog | |
//folder: folderModel.folder | |
selectFolder: true | |
selectMultiple: true | |
selectExisting: true | |
title: "Add directory to search path" | |
onAccepted: { | |
console.log(theFileDialog.folder); | |
console.log(fileUrl); | |
} | |
} | |
Button { | |
text: "click" | |
onClicked: { | |
theFileDialog.folder = "file:///home/kakadu/"; | |
console.log(theFileDialog.folder); | |
theFileDialog.open(); | |
console.log(theFileDialog.folder); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment