summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml49
1 files changed, 25 insertions, 24 deletions
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml
index 00a6bf7d4..04f1092f4 100644
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml
+++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml
@@ -51,10 +51,11 @@ Rectangle {
signal fileSelected(string file)
function selectFile(file) {
- if (file != "")
+ if (file !== "") {
folder = loader.item.folders.folder
+ fileBrowser.fileSelected(file)
+ }
loader.sourceComponent = undefined
- fileBrowser.fileSelected(file)
}
Loader {
@@ -160,28 +161,6 @@ Rectangle {
}
}
- Rectangle {
- id: cancelButton
- width: 100
- height: titleBar.height - 7
- color: "black"
- anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter }
-
- Text {
- anchors { fill: parent; margins: 4 }
- text: "Cancel"
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: fileBrowser.selectFile("")
- }
- }
-
ListView {
id: view1
anchors.top: titleBar.bottom
@@ -279,6 +258,28 @@ Rectangle {
Keys.onPressed: root.keyPressed(event.key)
}
+ Rectangle {
+ id: cancelButton
+ width: 100
+ height: titleBar.height - 7
+ color: "black"
+ anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter }
+
+ Text {
+ anchors { fill: parent; margins: 4 }
+ text: "Cancel"
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ font.pixelSize: 20
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fileBrowser.selectFile("")
+ }
+ }
+
Keys.onPressed: {
root.keyPressed(event.key);
if (event.key == Qt.Key_Return || event.key == Qt.Key_Select || event.key == Qt.Key_Right) {