Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2, 6.3, 6.4
-
-
315a5e3257 (qt/qtbase/6.4) 315a5e3257 (qt/tqtc-qtbase/6.4) 315a5e3257 (qt/tqtc-qtbase/6.4.1) 315a5e3257 (qt/tqtc-qtbase/tqtc/qtinsight-6.4)
Description
In WASM builds, passing "Images (*.png *.xpm *.jpg)" as the nameFilter argument to QFileDialog::getOpenFileContent (which is the example value from the documentation) has no effect and the resulting dialog does not have a filter. The issue here is almost certainly this code:
auto qtFilterStringToWebAcceptString = [](const QString &qtString) { // The Qt and Web name filter string formats are similar, but // not identical. return qtString.toStdString(); // ### TODO };
I think that the "Web name filter string format" that the comment mentions is the format described at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept, so that lambda expression presumably should convert "Images (*.png *.xpm *.jpg)" into something like ".png,.xpm,.jpg".
Attachments
Issue Links
- relates to
-
QTBUG-104948 QFileDialog::getOpenFileContent not honoring nameFilter
-
- Closed
-