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