how should connect QTableview using QtRPT design tool in qt creator (ubuntu 16.04 LTS) 64 bit
-
Hi All,
I am trying to use the TableView for my qt application which is connecting with MSSQL server and i have design the page using QtRPT design tool ....now i am trying to write code for below is code in this code they have used tablewidget ,instead of tablewidget need to use the TableView plz guide me ......QtRPT *report = new QtRPT(this);
QString ID,Name,Lastname,contact,EmailId;
// report->recordCount.append(ui->tableView->rowCount());
report->recordCount.append(ui->tableView->verticalHeader()->count());
// connect(report,&QtRPT::setValue,[&](const int recNo,const QString paramName,QVariant ¶mValue,const int reportPage)
connect(report,&QtRPT::setValue,[&](const int recNo, const QString paramName, QVariant ¶mValue, const int reportPage){
if(paramName == "ID")
{
//paramValue = ui->tableView->itemDelegateForRow(recNo,ID);
paramValue = ui->tableView->item(recNo,ID);} if(paramName == "Name") { paramValue = ui->tableView->item(recNo,Name) } if(paramName == "Lastname") { paramValue = ui->tableView->item(recNo,Lastname) } if(paramName == "contact" ) { paramValue = ui->tableView->item(recNo,contact) } if(paramName == "EmailId") { paramValue = ui->tableView->item(recNo,EmailId) } });
-
Hi,
QtRPT is not an official module from the Qt project. You should also try to contact the authors of that library on their forum.