A
A
Anton2018-07-17 06:44:26
Python
Anton, 2018-07-17 06:44:26

How to prevent the user from toggling the "checkbox" state in PyQt5?

Tell me how in PyQt5 to prevent the user from switching the state of the "checkbox"? The point is that I embed a checkbox in a QTableWidget cell and use it as a state indication. That is, I programmatically set the state of the "checkbox" and I do not need the user to be able to change it after that.
In principle, I already guessed how to implement it. It is necessary to prohibit writing to the cell itself. I know how to implement this manually via Qt Disagner (see attachment)
But I don’t know how to get to these flags from the program code. Can you please tell me the design or share a link where you can read about it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2018-08-23
@8toni8

longclaps longclaps @longclaps
Anton, my God. In the real world, there are objects whose purpose is to attract attention, but not to interact with them. An example, another example.
And what nafik html, there is a simple QPixmap.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question