Open/close Python plugin by just clicking on plugin button

by Rahul Verma   Last Updated January 24, 2019 22:22 PM

I created a Python plugin in QGIS which working fine. Now i want that whenever user click on the plugin button (located on top of QGIS bar) it count the number of click if the number of click is odd my plugin should be start and if number of click is even it should be close. How can i do this and how can i map my code to this button so that it know the no of clicks.below is my plugin button



Related Questions


Updated February 24, 2016 04:09 AM

Updated March 19, 2019 12:22 PM

Updated May 04, 2017 12:22 PM

Updated August 06, 2019 09:22 AM

Updated June 03, 2017 20:22 PM