The accept attribute of the <input /> tag does not work
Setting <input type="file" id="filepicker" accept=".cpp, .html, .h, .png, .qdoc, .qml" />, then click the input button, the file dialog pops up, but the file type filter does not work.
Qt widgets or QML?
Anyway the docs say:
acceptedMimeTypes is ignored by the default implementation, but might be used by overrides.
For QML follow the same principle.
Overrides the chooseFiles() is a good solution for me.