A QListWIdgetItem has property &quot;flags&quot; whose default is &quot;Selectable | DragEnable | UserCheckEnable | Enabled&quot; as total bitwise is 53<div><br></div><div>If i change the flags value, pyuic will not generate the change to .py</div>
<div><br></div><div>###bug.ui:</div><div><br></div><div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</div><div>&lt;ui version=&quot;4.0&quot;&gt;</div><div> &lt;class&gt;Dialog&lt;/class&gt;</div>
<div> &lt;widget class=&quot;QDialog&quot; name=&quot;Dialog&quot;&gt;</div><div>  &lt;property name=&quot;geometry&quot;&gt;</div><div>   &lt;rect&gt;</div><div>    &lt;x&gt;0&lt;/x&gt;</div><div>    &lt;y&gt;0&lt;/y&gt;</div>
<div>    &lt;width&gt;400&lt;/width&gt;</div><div>    &lt;height&gt;300&lt;/height&gt;</div><div>   &lt;/rect&gt;</div><div>  &lt;/property&gt;</div><div>  &lt;property name=&quot;windowTitle&quot;&gt;</div><div>   &lt;string&gt;Dialog&lt;/string&gt;</div>
<div>  &lt;/property&gt;</div><div>  &lt;widget class=&quot;QListWidget&quot; name=&quot;listWidget&quot;&gt;</div><div>   &lt;property name=&quot;geometry&quot;&gt;</div><div>    &lt;rect&gt;</div><div>     &lt;x&gt;90&lt;/x&gt;</div>
<div>     &lt;y&gt;40&lt;/y&gt;</div><div>     &lt;width&gt;256&lt;/width&gt;</div><div>     &lt;height&gt;192&lt;/height&gt;</div><div>    &lt;/rect&gt;</div><div>   &lt;/property&gt;</div><div>   &lt;item&gt;</div><div>
    &lt;property name=&quot;text&quot;&gt;</div><div>     &lt;string&gt;New Item&lt;/string&gt;</div><div>    &lt;/property&gt;</div><div>    &lt;property name=&quot;flags&quot;&gt;</div><div>     &lt;set&gt;ItemIsSelectable|ItemIsEditable|ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled&lt;/set&gt;</div>
<div>    &lt;/property&gt;</div><div>   &lt;/item&gt;</div><div>  &lt;/widget&gt;</div><div> &lt;/widget&gt;</div><div> &lt;resources/&gt;</div><div> &lt;connections/&gt;</div><div>&lt;/ui&gt;</div><div><br></div><div>####bug.py:</div>
<div><br></div><div><div># -*- coding: utf-8 -*-</div><div><br></div><div># Form implementation generated from reading ui file &#39;bug.ui&#39;</div><div>#</div><div># Created: Tue Dec 29 15:47:04 2009</div><div>#      by: PyQt4 UI code generator 4.6.2</div>
<div>#</div><div># WARNING! All changes made in this file will be lost!</div><div><br></div><div>from PyQt4 import QtCore, QtGui</div><div><br></div><div>class Ui_Dialog(object):</div><div>    def setupUi(self, Dialog):</div>
<div>        Dialog.setObjectName(&quot;Dialog&quot;)</div><div>        Dialog.resize(400, 300)</div><div>        self.listWidget = QtGui.QListWidget(Dialog)</div><div>        self.listWidget.setGeometry(QtCore.QRect(90, 40, 256, 192))</div>
<div>        self.listWidget.setObjectName(&quot;listWidget&quot;)</div><div>        QtGui.QListWidgetItem(self.listWidget)</div><div><br></div><div>        self.retranslateUi(Dialog)</div><div>        QtCore.QMetaObject.connectSlotsByName(Dialog)</div>
<div><br></div><div>    def retranslateUi(self, Dialog):</div><div>        Dialog.setWindowTitle(QtGui.QApplication.translate(&quot;Dialog&quot;, &quot;Dialog&quot;, None, QtGui.QApplication.UnicodeUTF8))</div><div>        __sortingEnabled = self.listWidget.isSortingEnabled()</div>
<div>        self.listWidget.setSortingEnabled(False)</div><div>        self.listWidget.item(0).setText(QtGui.QApplication.translate(&quot;Dialog&quot;, &quot;New Item&quot;, None, QtGui.QApplication.UnicodeUTF8))</div><div>
        self.listWidget.setSortingEnabled(__sortingEnabled)</div></div></div>