Hello,
I am struggling to get something to work, which would seem to be an easy thing
to do, but cannot quite make my understanding of the python docs work in
practice.
What I would like to do, is run some python to add some folders to the
favorites area in the browser within QGIS. This is to get round an
environemental constraint of not being able to save a profile i.e. quickly add
a python script to setup the favorites each time log on.
This is what I have tried thus far:
url = "U:\Tyres"
qgis.gui.QgsBrowserDockWidget(addFavoriteDirectory, uri)
-->
Traceback (most recent call last):
File "C:\OSGEO4~1\apps\Python37\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "<string>", line 3, in <module>
NameError: name 'addFavoriteDirectory' is not defined
AND
url = "U:\Tyres"
qgis.gui.QgsBrowserDockWidget(addFavorite, uri)
-->
Traceback (most recent call last):
File "C:\OSGEO4~1\apps\Python37\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "<string>", line 3, in <module>
NameError: name 'addFavorite' is not defined
Should I be calling the addFavorite code differently? This is within the Python
console and script area of same.
Regards,
Graeme
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user