[Qgis-developer] getting the selected filter from the Save style
brush.tyler at gmail.com
Thu Mar 8 20:29:53 EST 2012
On Fri, Mar 9, 2012 at 2:09 AM, Nathan Woodrow <madmanwoo at gmail.com> wrote:
> Can you use:
> QDir::Filters QFileDialog::filter () const
> void QFileDialog::filterSelected ( const QString & filter ) [signal]
yes I know, those methods are for QFileDialog objects.
If I remember well, creating a QFileDialog instance results in a
I'm talking about the static method and of course I have no QFileDialog
instance I can call those methods on.
NB: the static method should return the selected filter as well using a
in/out parameter (QString *selectedFilter = 0), but the problem is due
to a bug and I don't know if it was fixed and in which QT version.
> - Nathan
> On Fri, Mar 9, 2012 at 11:00 AM, Giuseppe Sucameli <brush.tyler at gmail.com>
>> 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 : 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 ).
>> 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 ,
>> Does anybody here know a better solution?
>> Otherwise I'm going to switch that filedialog to the non-native one.
>>  http://hub.qgis.org/issues/5136
>>  http://hub.qgis.org/issues/2298
>>  http://hub.qgis.org/issues/5096
>>  http://hub.qgis.org/issues/3763
>> Giuseppe Sucameli
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
More information about the Qgis-developer