Hi Richard, That worked perfectly, thanks!
When developing plugins I always find myself opening the Log window and the Python console, after I start up QGIS. It would be nice to have a way to save the panel layout. At the moment though, your code snippet is sufficient for my needs. Regards, Tej ________________________________ From: Richard Duivenvoorde <rdmaili...@duif.net> Sent: Tuesday, February 26, 2019 3:19 AM To: qgis-developer@lists.osgeo.org Cc: tej...@live.com Subject: Re: [QGIS-Developer] Programmaticaly open the Log Panel On 25/02/2019 09.57, Tejas L wrote: > Hello team, > > I would like to automatically open the Log Panel whenever Qgis starts. > Is there a way to do this? Hi, For what I know there is no api call for it directly, but you can search for child widgets in the main panel, something like this: for widget in iface.mainWindow().children(): if widget.objectName() == 'MessageLog': widget.show() Or shorter (but trickier): iface.mainWindow().findChild(QDockWidget, 'MessageLog').show() With me this pops up the Messagelog Panel (though then you do not have your tab yet, but that is a child of that one probably...) Regards, Richard Duivenvoorde Ps what do you want to use it for, because more people see the use of it maybe we can just add it (or ask to be added?)?
_______________________________________________ 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