Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
QTreeWidgetItemで編集不可能なチェックボックスを作成する方法を知っているが、QTreeWidgetItemを選択可能に保つ方法を知っている人はいますか?
Qt.ItemIsUserCheckableアイテムのフラグを設定するのではなく、またはに設定checkStateします。Qt.CheckedQt.Unchecked
Qt.ItemIsUserCheckable
checkState
Qt.Checked
Qt.Unchecked
チェックボックスの存在とユーザーのチェック可能性は独立しています。
これを試して:
setCheckState(0,Qt::Checked);