Can you use:<br><br>QDir::Filters QFileDialog::filter () const<br><br>or <br><br>void QFileDialog::filterSelected ( const QString & filter ) [signal]<div><br></div><div><a href="http://qt-project.org/doc/qt-4.8/qfiledialog.html#filter">http://qt-project.org/doc/qt-4.8/qfiledialog.html#filter</a></div>
<div><br></div><div>- Nathan<br><br><br>On Fri, Mar 9, 2012 at 11:00 AM, Giuseppe Sucameli <<a href="mailto:brush.tyler@gmail.com">brush.tyler@gmail.com</a>> wrote:<br>><br>> Hi all,<br>><br>> yesterday night I pushed to master the support to SLD.<br>
> The feature is available from the Save style/Load style buttons in vector<br>> layer properties.<br>><br>> BTW, there's a problem [1]: you need to add ".sld" extension to the<br>> output filename when saving because there's no way to distinguish what<br>
> format was selected in the native file dialog (see [2]).<br>><br>> I remember this was a QT issue (right?) using the<br>> QFileDialog::getSaveFileName static method and this problem was already<br>> handled in more than a place using 2 different solutions:<br>
><br>> - adding a combo to select the format before selecting the filename (e.g.<br>> "Save as..."),<br>> - using the non-native filedialog (e.g. "Save image...")<br>><br>> Of course I cannot add the format combo to the Vector layer property GUI<br>
> (where should I put it?), but I would avoid the second solution because<br>> there are some tickets about using the non-native filedialogs (see [3], [4]).<br>><br>> Does anybody here know a better solution?<br>
> Otherwise I'm going to switch that filedialog to the non-native one.<br>><br>> Regards.<br>><br>> [1] <a href="http://hub.qgis.org/issues/5136">http://hub.qgis.org/issues/5136</a><br>> [2] <a href="http://hub.qgis.org/issues/2298">http://hub.qgis.org/issues/2298</a><br>
> [3] <a href="http://hub.qgis.org/issues/5096">http://hub.qgis.org/issues/5096</a><br>> [4] <a href="http://hub.qgis.org/issues/3763">http://hub.qgis.org/issues/3763</a><br>><br>> --<br>> Giuseppe Sucameli<br>
> _______________________________________________<br>> Qgis-developer mailing list<br>> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br></div>