I need to apply a .qml style to a layer on my map as part of a Python plugin. I gather that this can be done via
QgsMapLayer.loadNamedStyle(). The problem I have is that my .qml file is stored within my plugin directory and I can't figure out how to reference the path at runtime.
The plugin is in my user plugin directory (/home/[user]/.qgis2/python/plugins/[plugindirectory]) not the main QGIS plugin directory, so I can't get a reference via
What's the best way to accomplish this?