[Interest] FileDialog nameFilters: is it supposed to work on Android?

Nuno Santos nuno.santos at imaginando.pt
Tue Oct 22 11:26:07 CEST 2024


Alexander,

Thank you very much for your reply.

I’m trying with a very specific type of file (.bpf).

Do you think this might be the reason for not working? 

Zip is a well know type of file. I have been reading about file filtering in Android and it seems it only works with mime type.


Also, using defaultSuffix does not work either. When I set a defaultSuffix it always enters the filename without the suffix and creates a new file without the suffix.

Have you ever seen this working?

Thanks!

Regards,

Nuno

> On 22 Oct 2024, at 07:01, Alexander Dyagilev <alervdvcw at gmail.com> wrote:
> 
> Hello,
> 
> It seems it's working fine on my Android 14 Samsung A55 phone.
> 
> FileDialog
>                 {
>                  
>                     nameFilters: [qsTr("Zip files") + " (*.zip)" + App.loc.emptyString]
>                     fileMode: FileDialog.SaveFile
>                 }
> 
> It still shows all files, however non-zip files are grayed out.
> 
> 
> On Mon, Oct 21, 2024 at 10:06 PM Nuno Santos via Interest <interest at qt-project.org <mailto:interest at qt-project.org>> wrote:
>> Hi,
>> 
>> I’m trying to use name filters on FileDialog on Android.
>> 
>> I’ve tried several combinations but it does not seem to work.
>> 
>> Is this supposed to work?
>> 
>> Thanks!
>> 
>> Regards,
>> 
>> Nuno
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org <mailto:Interest at qt-project.org>
>> https://lists.qt-project.org/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20241022/667944fd/attachment.htm>


More information about the Interest mailing list