<div><span style="color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px;">the PySide code here prompts "TypeError: 'str' object is not callable" while it is working,but  <span id="_editor_bookmark_start_1" style="display: none; line-height: 0px;">‍</span></span><span style="color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px;">When changed to PyQt code, it works well.<span id="_editor_bookmark_start_2" style="display: none; line-height: 0px;">‍</span></span></div><div><span style="color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px;"><br></span></div><div><span style="color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px;">The reason why this happen is because you cannot </span><span style="line-height: 1.5;"><span id="_editor_bookmark_start_3" style="display: none; line-height: 0px;">‍</span></span><span style="line-height: 1.5;">self.text = None in PySide,<span id="_editor_bookmark_start_4" style="display: none; line-height: 0px;">‍</span></span></div><div><span style="color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px;"><br></span></div><div><span style="color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px;">It seems naming-clash error happened in PySide while not in PyQt , so </span><span class="comment-copy" style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 16px;">Which used a rather good tool to wrap Qt for Python , PySide or PyQt ?</span><span style="color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px;"> <span id="_editor_bookmark_start_5" style="display: none; line-height: 0px;">‍</span></span></div><div><br></div><div><br></div><div><div>from PySide import QtGui, QtCore</div><div><br></div><div><br></div><div>class MyProgressBar(QtGui.QProgressBar):</div><div><br></div><div>    def __init__(self):</div><div>        super().__init__()</div><div>        self.setRange(0, 0)</div><div>        self.setAlignment(QtCore.Qt.AlignCenter)</div><div>        self.text = None</div><div><br></div><div>    # def setText(self, text):</div><div>    #     self.text = text</div><div><br></div><div>    # def text(self):</div><div>    #     return self.text</div><div><br></div><div>app = QtGui.QApplication([])</div><div><br></div><div>p = MyProgressBar()</div><div># p.setText('finding resource...')</div><div>p.show()</div><div><br></div><div>app.exec_()<span id="_editor_bookmark_start_0" style="display: none; line-height: 0px;">‍</span></div></div>