QTableWidget Model (CellWidget) And LimeReport problem
-
Hi All ,
I Have A problem With LimeReport Cannot Read Cell Widgets data inside QTableWidget Model
is There Any way Casting this data , so Limereport can read it ?
i mean some Columns Are Spinbox , And QTextEdit ~~^^QDoubleSpinBox *spinbox=new QDoubleSpinBox(ui->tableWidget); ui->tableWidget->setCellWidget( ui->tableWidget->rowCount() - 1, 2, spinbox ); LimeReport::ReportEngine *report=new LimeReport::ReportEngine(this); auto model=ui->tableWidget->model(); report->dataManager()->addModel("tablemodel",model,false);
it shows cell widget columns empty ...
-
That's your issue.
Use delegates if you need custom editors but don't use cell widgets like that. They are not meant to be used like you do.
-
Hi,
Do you mean you have filed your QTableWidget with cell widgets ?
-
@SGaist said in QTableWidget Model (Custom Widget) And LimeReport problem:
Do you mean you have filed your QTableWidget with cell widgets ?
@SGaist
Yes broQDoubleSpinBox *spinbox=new QDoubleSpinBox(ui->tableWidget); ui->tableWidget->setCellWidget( ui->tableWidget->rowCount() - 1, 2, spinbox );
-
That's your issue.
Use delegates if you need custom editors but don't use cell widgets like that. They are not meant to be used like you do.