#include <QApplication>
#include <QLineEdit>
#include <QTableWidget>
#include <tablewidget.h>
#include <lineedit.h>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    TableWidget table;
    table.setRowCount(3);
    table.setColumnCount(3);

    LineEdit *lineEdit1,*lineEdit2,*lineEdit3;
    lineEdit1 = new LineEdit;
    lineEdit2 = new LineEdit;
    lineEdit3 = new LineEdit;
    table.setCellWidget(1, 0, lineEdit1);
    lineEdit1->setRowColumn(1,0);
    table.setCellWidget(1, 1, lineEdit2);
    lineEdit2->setRowColumn(1,1);
    table.setCellWidget(1, 2, lineEdit3);
    lineEdit3->setRowColumn(1,2);
    QObject::connect(lineEdit1,SIGNAL(focusedIn(int,int)),&table,SLOT(lineEditChanged(int,int)));
    QObject::connect(lineEdit2,SIGNAL(focusedIn(int,int)),&table,SLOT(lineEditChanged(int,int)));
    QObject::connect(lineEdit3,SIGNAL(focusedIn(int,int)),&table,SLOT(lineEditChanged(int,int)));

    table.resize(400, 200);
    table.show();

    return a.exec();
}
