View Full Version : how to show Grid on canvasview

13th October 2007, 20: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?

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

14th October 2007, 05: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:)!

14th October 2007, 10: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.