i have been able to draw only one rectangle but i need to draw 64 rectangles using a painter. so please can anyone help me..? i need 64 rectangles with different co_ordinates so plz help me how to change the coordinates . should i hardcode the x and y co-ordinates.
the code is as follows:
#include <QPaintEvent>
#include <QMainWindow>
void paintEvent(QPaintEvent *event)
{
QRect rectangle(0,0,100,100);
QPainter painter;
painter.setBrush(Qt::black);
painter.drawRext(rectangle);
}