I actually got a response on Stack Exchange regarding this query, so in the
interests of sharing the response...
Code to run in QGIS Python console is:
browserModel = iface.browserModel()
dirs = ['U:\dir1', 'U:\dir2', 'U:\dir3', 'U:\dir4']
for dir in dirs:
On 5/23/20 11:21 AM, Jorge Gustavo Rocha wrote:
> Hi Seggie,
>
> Just one line of code to add a folder to browser panel:
>
> iface.browserModel().addFavoriteDirectory('/home/jgr/tmp')
And to add some more context: QGIS is build using Qt widgets, which has
a model/view programming paradigm:
Hi Seggie,
Just one line of code to add a folder to browser panel:
iface.browserModel().addFavoriteDirectory('/home/jgr/tmp')
Regards,
Jorge
On 22/05/20 14:37, Seggie, Graeme wrote:
>
> Hello,
>
>
>
> I am struggling to get something to work, which would seem to be an
> easy thing to do,
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