PDA

View Full Version : how to show Grid on canvasview



kstking
13th October 2007, 19:02
--i have run the example gridview at http://www.ida.liu.se/~TDDB28/kursbibliotek/Qt/examples/gridview/
-> it run ok. But it just run on widget.
How can i use class QGridView on canvasview?

wysota
13th October 2007, 22:09
You can, for example, implement an item that will draw the grid on the canvas.

kstking
14th October 2007, 04:15
how can i do? please say more detail . thank for your help!.
Would you please give me some examples about that. thanks so much:)!

wysota
14th October 2007, 09:53
You need to implement a subclass of QCanvasItem and draw the grid there the same way the "gridview" app does that on a widget. Please take a look at QCanvas docs for details and examples.

http://doc.trolltech.com/3.3/canvas.html