Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to write a python plugin for QGis. I'd like to debug some DB queries and I need a way to display the result.

I thought about using a popup to display it, but I don't know how to show a popup from inside a python plugin.

Can anyone suggest me how to do that?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Finally I solved this way:

def printMsg(self,msg):
    QMessageBox.information(self.iface.mainWindow(),"Debug",msg)

I don't know if it's the best way to go, but it seems to work fine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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