Draw grid in QGraphicsScene/QGraphicsView
-
Hi,
I'm using Qt 5.2 with Qt creator. I' want to draw a lot of rectangle(100 to 1 million) and fill them with 2 colors. To do this quickly I choose to1- fill background with one color
2-draw the complete grid with big lines
3-and fill each rectangle with the second color.!http://img11.hostingpics.net/pics/685155square2.png(exemple)!
I've done this with direct2D and GDI, it worked well. But with Qt, I'm lost with QGraphiquesScene/view because all my rectangle need to be a square, but while extending my view I' get a weird result. With direct2D my grid size is the lowest size of my view.
So I need your help. I'm using
@painter->drawLines(lines.data(), lines.size());@What I got with QT
!http://img11.hostingpics.net/pics/239802cute.png(exemple I got)!