I have made a new QGIS Plugin, almost everything is working fine, but I can click on my Plugin-Button several times and it starts several times. So I see my Plugin 4 or 5 times. How can I prevent that?

Almost no Plugin out there shows this behavior, but I can't figure out what I do have to change.


If you have a QDialog (you didn't exactly specify what your Plugin opens) you could set it modal.

In Qt Designer by ticking the modal checkbox:

Qt Designer modal

Or in the corresponding *.py:

  • Thank you very much, yes, I open a QDialog. I friend of mine helped me to develop a solution for the problem, but I knew that there has to be a very simple way, I just did not know, that the solution is so amazingly simple!!! – AndreasK Dec 6 '15 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.