[Qgis-developer] QFileDialog with long filter name

Giuseppe Sucameli brush.tyler at gmail.com
Sun Jan 3 19:07:45 EST 2010


Hi guys,

I've a problem when I use the QFileDialog with filters
in GdalTools-plugin (python).

If I use QFileDialog static methods, passing in filters args
a filter with a very long name, the dialog becomes larger
then the screen width becouse it adjusts automatically its
size.
Instead, if I create a QFileDialog instance and after I
set the filters, it works fine (by the way, the dialog created
is also different from the previous one and this is strange!).

Becouse I use the QFileDialog in every tool within the
plugin, I prefere to use the static methods to avoid to write
4 function to create the dialog and set filters (to replace
openFile, openFiles, openDir, saveFile).
There is another solution to set the dialog dimensions to
the normal ones when I use the QFileDialog static methods?

Thank in advance.

-- 
Giuseppe Sucameli


More information about the Qgis-developer mailing list