I'm making a complement for QGIS3, how can I export the map I'm seeing in the window to .PNG using Plugin Builder. Without having to go through Print Composers.
I assume you know how to create a plugin by Plugin Builder 3. If so, briefly, delete the code lines under
def run(self): line in main file of your plugin and just add the following code under
def run(self): line.
If you don't know how to create a plugin by Plugin Builder 3, firstly please refer to Qgis Plugin Builder page.