1 Attachment(s)
Centering a QCheckBox in a TableView
I was having some issues getting the TableView to display a QCheckBox and have it interact correctly. Low and behold the issue was that I never implemented the set on the model. For anyone else having issues, I tweaked the querymodel example to have a selected field, here is the complete code:
Attachment 4879
Q: How does one go about getting the QCheckBox to be centered in the TableView?
Sam
Re: Centering a QCheckBox in a TableView
Delegates, I guess :rolleyes:
Re: Centering a QCheckBox in a TableView
Well, there are two reasons I posted the code, in order of importance:
- So others can see exactly how to use the Checked State in a table with the sql query model
- So others can tinker with the code to figure the correct way of center the check box rather then just guessing.