[Interest] Qt.PartiallyChecked broken for QListWidget in Qt 5.11?
Patrick Stinson
patrickkidd at gmail.com
Thu Jun 7 06:26:38 CEST 2018
It appears as though QListWidget does not honor Qt::PartiallyChecked in Qt-5.11, though I could be making a mistake somewhere here. The following code accurately stores Qt::PartiallyChecked in the check state, and ‘1’ is printed by the print line. However, the painting does not reflect this (see screenshot). Am I making a mistake?
app = QApplication(sys.argv)
lv = QListWidget()
item = QListWidgetItem()
item.setText('here')
item.setFlags(item.flags() | Qt.ItemIsEditable | Qt.ItemIsUserCheckable | Qt.ItemIsAutoTristate)
item.setCheckState(Qt.PartiallyChecked)
lv.addItem(item)
print(item.checkState())
lv.show()
app.exec()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180606/cfa3a38b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 5316 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180606/cfa3a38b/attachment.png>
More information about the Interest
mailing list