PDA

View Full Version : example code of table view with a custom delegate?



Dreamerzz
22nd June 2011, 16:29
Hey, im looking for some example code that includes a table of widgets, to gain an understanding of how the delegates-in-view code works.


I checked out both examples provided by qt but they were pretty complex and more than what i wanted (not looking to edit things, but rather just put labels and maybe pictures inside tables and hide the table lines)

Thanks!

Santosh Reddy
22nd June 2011, 17:33
Did you look at Pixelator Example (http://doc.qt.nokia.com/4.7-snapshot/itemviews-pixelator.html), it is just a non editable deltegate with custom painting on it. I don't think it is complex (but it looks so)

If you still feel this is not simple, then I would recommend to display a custom items/widges in a view, then when it comes to edting then you can focus on delgates.

Eidt: This example is simplest Spin Box Delegate Example (http://doc.qt.nokia.com/4.7-snapshot/itemviews-spinboxdelegate.html)