How in pyqt change text in QPlainTextEdit() if slider's value is 1, and don't change if the value is 0?
<pre><code>message = QtGui.QPlainTextEdit()
slider = QtGui.QSlider()
def slider_func():
    if slider.value() == 0:
       '''what to write here ?'''

    if slider.value() == 1:
        m = str(message.toPlainText())
        translated = ''
        i = len(m) - 1
        while i &gt;= 0:
            translated = translated + m[i]
            i = i - 1
        message.setPlainText(translated)
QtCore.QObject.connect(slider, QtCore.SIGNAL('valueChanged(int)'),
                    slider_func)
</code></pre>

<p>When I set slider to the first tick, the text gets reversed. But when I set it to the begining the text is still reversed. I know that the problem is that once the text was changed it sets the text edit line. Any ideas how to solve it ? <a href="http://i.stack.imgur.com/drz5v.png" rel="nofollow">Example1</a>, <a href="http://i.stack.imgur.com/zdflE.png" rel="nofollow">Example2</a></p>