[API] FilePickerPage pre-select fille
For my app SeaPrint, I used the FilePickerPage component to let the user select a file to print. It has the very nice feature of providing the mime type and other file information, which is good for matching printers to file type.
I would also like to allow it to accept a file on the command line, or possibly even over dbus. But this functionality cannot rely on FilePickerPage to provide the mime type, as the properties are read-only, and thus doesn't update even if i was to set the selected file.
Any chance this can be included in a future release? Or is there some better way i should be doing this?
are you qml-only? can't you just use https://doc.qt.io/qt-5/qmimedatabase.html?
coderus ( 2020-02-18 20:39:00 +0200 )editNo, so i guess that's an option... it just felt so backwards to re-implement functionality. I'll go that route for now.
attah ( 2020-02-18 20:52:24 +0200 )editpickers in sfos are single-purpose, mainly for internal use, not handy apis
coderus ( 2020-02-19 10:24:04 +0200 )editThat's sad, but you are probably right as always :) I got it working, thanks.
attah ( 2020-02-19 10:54:15 +0200 )edit