rendered paste body#include <QtGui>
#include "labelgrid.h"
LabelGrid::LabelGrid(QWidget *parent)
: QWidget(parent)
{
QLabel* cells[9][9];
QGridLayout* layGrid = new QGridLayout(this);
for(int i = 0; i < 9; i++) {
for(int j = 0; j < 9; j++) {
cells[i][j] = new QLabel(this);
cells[i][j]->setText("X");
cells[i][j]->setLineWidth(1);
cells[i][j]->setFrameStyle(QFrame::Box|QFrame::Plain);
layGrid->addWidget(cells[i][j], i, j);
}
}
QApplication::setStyle(new QPlastiqueStyle);
setWindowTitle(tr("Labels Grid"));
resize(500,500);
setLayout(layGrid);
}