A QListWIdgetItem has property "flags" whose default is "Selectable | DragEnable | UserCheckEnable | Enabled" 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><?xml version="1.0" encoding="UTF-8"?></div><div><ui version="4.0"></div><div> <class>Dialog</class></div>
<div> <widget class="QDialog" name="Dialog"></div><div> <property name="geometry"></div><div> <rect></div><div> <x>0</x></div><div> <y>0</y></div>
<div> <width>400</width></div><div> <height>300</height></div><div> </rect></div><div> </property></div><div> <property name="windowTitle"></div><div> <string>Dialog</string></div>
<div> </property></div><div> <widget class="QListWidget" name="listWidget"></div><div> <property name="geometry"></div><div> <rect></div><div> <x>90</x></div>
<div> <y>40</y></div><div> <width>256</width></div><div> <height>192</height></div><div> </rect></div><div> </property></div><div> <item></div><div>
<property name="text"></div><div> <string>New Item</string></div><div> </property></div><div> <property name="flags"></div><div> <set>ItemIsSelectable|ItemIsEditable|ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set></div>
<div> </property></div><div> </item></div><div> </widget></div><div> </widget></div><div> <resources/></div><div> <connections/></div><div></ui></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 'bug.ui'</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("Dialog")</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("listWidget")</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("Dialog", "Dialog", 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("Dialog", "New Item", None, QtGui.QApplication.UnicodeUTF8))</div><div>
self.listWidget.setSortingEnabled(__sortingEnabled)</div></div></div>