Hi Paul,
I do not think it is supported now, but a workaround could be:
- Add a variable 'version' with the plugin version number to your plugin
class.
- Then do:
qgis.utils.plugins['your plugin name'].version
You could even write a version() function that reads the version number
from the metadata.txt to prevent redundancy.
I wonder if there is another way though..
Kind regards,
Raymond
On 13-09-19 10:05, Paul Wittle wrote:
Hi,
It is possible to see the plugin version number (from the metadata file)
when you open the manage plugins window and select a plugin.
Is it possible to retrieve this version number using Python in the
plugin itself?
It’s not really very important but I just want to be able to include it
in messages; so for example, “You have successfully upgraded to
version…” or being able to automatically include the version number in
bug reporting.
I did try an internet search but it just comes up with people looking
for the version of Python rather than the actual version of the plugin
itself.
Thanks in advance,
Paul
This e-mail and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed. It may
contain unclassified but sensitive or protectively marked material and
should be handled accordingly. Unless you are the named addressee (or
authorised to receive it for the addressee) you may not copy or use it,
or disclose it to anyone else. If you have received this transmission in
error please notify the sender immediately. All traffic may be subject
to recording and/or monitoring in accordance with relevant legislation.
Any views expressed in this message are those of the individual sender,
except where the sender specifies and with authority, states them to be
the views of Dorset Council. Dorset Council does not accept service of
documents by fax or other electronic means. Virus checking: Whilst all
reasonable steps have been taken to ensure that this electronic
communication and its attachments whether encoded, encrypted or
otherwise supplied are free from computer viruses, Dorset Council
accepts no liability in respect of any loss, cost, damage or expense
suffered as a result of accessing this message or any of its
attachments. For information on how Dorset Council processes your
information, please see www.dorsetcouncil.gov.uk/416433
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer