[Qgis-developer] load layer style failed - possible bug?
Jürgen E. Fischer
jef at norbit.de
Mon Jul 20 04:53:36 EDT 2009
Hi Luca,
On Mon, 20. Jul 2009 at 10:09:51 +0200, Luca Mandolesi wrote:
> Hi, I'm working on MacOs X and writing a little plugin in python that load
> layer with .qml style.
> If the .qml file It's into HD directory, I haven't problems, but If I put
> the qml file into ./qgis/python/plugins/myplugindir/ Qgis cannot read the
> file. So, it's impossible writin a python plugin with .qml files contained
> into the plugin.
> Some suggestions??
How are you trying to load the qml? Loading with
QgsMapLayer::loadNamedStyle() should work with any path.
If you want to have QGIS automatically loaded the qml when you load the layer
the qml needs to reside in the same directory and have the same name as the
vector data source.
Jürgen
--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-20
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de
--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
More information about the Qgis-developer
mailing list