[Qgis-developer] qlr files gets no extension + general utils

Richard Duivenvoorde rdmailings at duif.net
Wed Mar 19 08:30:09 PDT 2014


I'm playing around a little with Nathans 'layer definition files', and
it appeared to me that when I do a 'Save as Layer Definition file', and
name the file 'bla' (without extension), it is exactly saved like that
(without extension .qlr).
That makes the file invisible to open via 'Layer/Add from Layer
definition file', because 'bla' is not shown to me as there is the .qrl

This is off course a pretty common problem, which can be seen in more
places and plugins. I've programmed that in my plugins several times
too: check for certain extension, if not, add it...

Question: is there (or possible to create) some 'utils' function for
doing this? Preferably usable both in cpp and QGIS?

I've also seen a python 'utils' class somewhere (nhv?). Maybe we could
'centralize' this kind of utils.

Another candidate, if I'm not mistaken there is already some 'LineEdit'
available which has this nice 'clean input'-brush in it. Is that
available for python too?


Richard Duivenvoorde

More information about the Qgis-developer mailing list