FileDialog will omit the nameFilter if you switch between select folder and select file
-
OS : win7 64bit
Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)@
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Dialogs 1.0
import QtQuick.Layouts 1.0ApplicationWindow{
id: roottitle: "Color Correction" color: syspal.window width: 1450 height: 750 minimumHeight: 750 minimumWidth: 1400 SystemPalette {id: syspal} ListModel{ id: fileModel } FileDialog{ id: fileDialog selectMultiple: true nameFilters: [ "Image files (*.bmp *.jpg *.JPEG *.png *.ppm *.tiff *.xbm *.xpm)" ] } ColumnLayout{ anchors.fill: parent Button{ text: "select folder" MouseArea{ anchors.fill: parent onClicked: { fileDialog.selectFolder = true fileDialog.selectMultiple = false fileDialog.open() } } } Button{ text: "select images" MouseArea{ anchors.fill: parent onClicked: { fileDialog.selectFolder = false fileDialog.selectMultiple = true fileDialog.open() } } } }
}
@
After I click the button of select folder, the nameFilters of the FileDialog will not
function anymore, Anyone know what is happening?