I develop a QGIS plugin that includes a step of georeferencing. I want to open the Georeferencer from QGIS and to load an image with its path when I click on a PushButton.
I found this topic : Open Georeferencer and load raster at startup
which seemed to conclude that it's not possible to pass an argument when opening the Georeferencer (and the proposed code doesn't really work for me) :
self.iface.mainWindow().findChild(QAction, "&Georeferencer").trigger()
for x in self.iface.mainWindow().findChildren(QMainWindow):
if x.objectName() == 'QgsGeorefPluginGuiBase':
for y in x.children():
if 'mActionOpenRaster' in y.objectName():
y.trigger()
I got the following error :
AttributeError: 'NoneType' object has no attribute 'trigger'
so "&Georeferencer"
surely isn't the good attribute to open it.
It's been answered for QGIS2. Is there any way to access Georeferencer window from QGIS3 interface and pass an image as input?
I looked at processing and the Georeferencer is not part of it.