Quote Originally Posted by ChrisW67 View Post
The example you linked to has nothing to do with an SQL model. The model data can come from anywhere as long as it is presented using the QAbstractItemModel interface. The model provides data only.

The rendering of data in a view has nothing to do with the model. The view passes the painting and editor creation for each cell to a delegate, either the default one or one you provide, and the delegate decides what to display for the data the model is providing. The model may provide data indicating a colour, font, icon etc. but the view delegate can choose how to use (or ignore) that information when displaying the data. The type of editor provided for a cell is entirely decided by the delegate.
Hey ChrisW67,

Now i understand everything , i am sorry this model view concept is confusing . I will try to alter the delegate class with Paint and create editor and will try to play with it. Hopefully i will achieve my target. I will stick to model view concept instead of QtableWidget .

Thanks for the motivation.