PDA

View Full Version : limited QFileDialog filters on Windows XP



divide
29th July 2011, 15:37
Hi,

I use QFileDialog::getOpenFileName with different filters, and one default filters with all supported extensions ("All Supported Formats (*.ext1 *.ext2 *.ext3...)".
So this default filter can get pretty larger if many formats are supported.

It works on Windows 7, but when used on Windows XP the default filter gets truncated after 255 chars or so. So only the first extensions in this filter are used, a lot of files cannot be displayed because of that.

Any idea/workaround ? (other than using a single dirty *.* filter).

Thanks

totem
29th July 2011, 16:38
you could split the "all supported formats" line in two or more lines, like :

"All Supported Formats of type 1 (*.ext1 *.ext2 *.ext3...)"
"All Supported Formats of type 2 (*.ext10 *.ext11 *.ext12...)"

this could work fine if you find common points for different sets of formats :

"Images (*.png *.jpg *.bmp...)"
"Documents (*.txt *.dat *.doc...)"

instead of

"All Supported Formats (*.png *.jpg *.bmp *.txt *.dat *.doc...)"

It depends on what these formats are of course