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 am starting to develop a plugin for Qgis using python, which i am very new at, and would like to view some results of variables by displaying a message in QGIS. How can I do this?

share|improve this question
    
Isn't Plugins->Python_console enough for you? –  SS_Rebelious Oct 24 '12 at 8:28
    
The Python console isn't really meant for that. –  Nathan W Oct 24 '12 at 8:53
2  
Do you mean you want to show a message box with some values. –  Nathan W Oct 24 '12 at 8:53
    
Yes, I would like to show a message box with some values –  GreyHippo Oct 25 '12 at 0:58
add comment

2 Answers

some_variable = feature.geometry()   

QMessageBox.information(None, "DEBUG:", str(some_variable)) 
share|improve this answer
add comment

Another good option is the message log.

QgsMessageLog.logMessage("message")
share|improve this answer
add comment

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.