FileDialog filemode not working
-
I'm trying to save the video file using FileDialog component in QML.For that,I have been using
this statement.
import Qt.labs.platform 1.1FileDialog { id: save_vid_Dialog title: "Please choose a file" folder: StandardPaths.writableLocation(StandardPaths.MoviesLocation) fileMode:FileDialog.SaveFile nameFilters: ["AVI files (*.avi)", "Mp4 files (*.mp4)", "MKV files (*.mkv)"] onAccepted: { console.log(FileDialog.SaveFile) save_vid_Dialog.close() } onRejected: { save_vid_Dialog.close() } }
But,I'm receving this error qrc:/LiveStream.qml:501:8: Unable to assign [undefined] to int
for the line : fileMode:FileDialog.SaveFile
why the filemode is not accepting the value -
I'm trying to save the video file using FileDialog component in QML.For that,I have been using
this statement.
import Qt.labs.platform 1.1FileDialog { id: save_vid_Dialog title: "Please choose a file" folder: StandardPaths.writableLocation(StandardPaths.MoviesLocation) fileMode:FileDialog.SaveFile nameFilters: ["AVI files (*.avi)", "Mp4 files (*.mp4)", "MKV files (*.mkv)"] onAccepted: { console.log(FileDialog.SaveFile) save_vid_Dialog.close() } onRejected: { save_vid_Dialog.close() } }
But,I'm receving this error qrc:/LiveStream.qml:501:8: Unable to assign [undefined] to int
for the line : fileMode:FileDialog.SaveFile
why the filemode is not accepting the valuewe have to define only one import statement for dialog component at a time. For my work, Qt.labs.platform 1.1 works fine so I discarded the other one. Like this,I have commented out the Dialogs component
import QtQuick 2.15 import Qt.labs.platform 1.1 import QtQuick.Controls 2.15 import QtGraphicalEffects 1.15 import QtQuick.Layouts 1.15 //import QtQuick.Dialogs 1.3
-