Using QGIS 3.28.1 (Windows), I wanted to automatically change the default coordinate display axis order of a new QGIS project to "XY". Unfortunately there is no global setting for this, so I created a startup.py
file with the following code:
from qgis.core import QgsProject,QgsMessageLog,Qgis
QgsProject.instance().displaySettings().setCoordinateAxisOrder(Qgis.CoordinateOrder.XY)
QgsMessageLog.logMessage('CoordinateAxisOrder: %s' % QgsProject.instance().displaySettings().coordinateAxisOrder(),'Custom',Qgis.Info)
Although the message log shows me that the axis order has been changed, QGIS shows no change at all.
Do I need to use any signal to change the default coordinate display axis order? And if possible, can I change the value via Python plugin?