[PyQt] Disable QSpinBox in QTableView
david at boddie.org.uk
Sat Apr 21 16:22:46 BST 2012
On Sat, 21 Apr 2012 09:10:05 +0300, Vadym wrote:
> I built QTableView table with proxy, delegates and everything works
> fine. When I try to edit cells with digits or double data appears
> QSpinBox as editor and it's my problem. I don't want and didn't create
> QSpinBox as delegate at all and any other delegates for these columns.
> So, I dont understand is it feature and right behaviour or my mistake?
> In any case I like to disable this editor or, at least, find how it
> can be modified? Couple hours with google didn't give me any result...
One quick thing to try would be to set the data as strings in the model.
An alternative to this would be creating your own custom delegate that
overrides the default editor for numbers, but that is more work.
More information about the PyQt