<div dir="ltr"><div><div><div><br><br></div>Hi. I'm working on a plugin for the Composer, but it seems that few people are interested in this aspect of QGIS, so I rarely get answers to my difficulties on stackexchange (<a href="http://gis.stackexchange.com/questions/174648/how-to-use-itemchanged-signal-to-update-data">http://gis.stackexchange.com/questions/174648/how-to-use-itemchanged-signal-to-update-data</a>).<br><br></div>I need to to call a function when I move one of the QgsComposerItems on the composer. For example a QgsComposerLabel that is already placed on the composer and whose variable name is <i>label1</i>, this code<br><p><code>def setCoordText(): <br></code></p><p><code> label1.setText(str(label1.x()) + "," + str(label1.y()))</code></p>
<p><code>label1.itemChanged.connect(setCoordText)</code></p><p><br></p><p>should show the x and y numbers of the label's new location. However this only works if the label is moved AND then is put back with an UNDO command. It is as if the signal is triggered by the Undo command, but not the move itself. Can anybody help me with this? Thank you<code></code></p></div></div>