PDA

View Full Version : Drawing a grid



LevelFour
13th February 2010, 10:31
Greetings,

Would anyone have any sample code for drawing a grid - a set of vertical and horizontal lines that fill a view space?

Ideally I would like to draw a rectangular grid and then transform it to an isometric projection.

Thank you!

axeljaeger
14th February 2010, 16:38
Basically you overwrite QWidget::paintEvent, open a QPainter on that widget and have two for-loops: One for the vertical lines and one for the horizontal ones.