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 writing a plugin that replaces the text of a composer label based on its itemID.

When I change the text of the label using:

item.setText("Hello World")

the label changes on the composer but the text in the Item Properties panel for the label doesn't, it stays as what it was originally.

If I call item.displayText() before and after I change the label text this returns the correct information.

How do I get the text to change in the Item Properties panel? Using qgis 1.8 and 1.9

share|improve this question
    
sounds like a bug. –  Nathan W Jun 25 '12 at 11:01
    
I have reported the bug: hub.qgis.org/issues/5862 –  James S Jun 25 '12 at 14:24

1 Answer 1

For reference, this was fixed in QGIS 2.0. Now, calling

item.setText("Hello World")

will automatically update the text in the item properties panel too.

share|improve this answer
    
I would like to upvote this but it has been "flagged as low-quality because of its length and content". Would you be able to expand upon your Answer with just a paragraph describing perhaps how this works now? –  PolyGeo May 18 at 7:34

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.