문제

Does anyone know how to make an uneditable checkbox ina QTreeWidgetItem but keep the QTreeWidgetItem selectable?

도움이 되었습니까?

해결책

Don't set the flag Qt.ItemIsUserCheckable of the item, but set the checkState to Qt.Checked or Qt.Unchecked.

The presence of a checkbox and the user checkability are independent.

다른 팁

Try this:

setCheckState(0,Qt::Checked);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top