Hi,
I have definitons in header file like below;
QSqlQueryModel *raporModel;
LimeReport::ReportEngine *mRapor;
And in mainwindow.cpp
mRapor = new LimeReport::ReportEngine(this);
raporModel = new QSqlQueryModel(this);
And when I press the showReport button;
raporModel->setQuery("SELECT * FROM tartim WHERE belge_no = '" + belge_no + "' ;");
mRapor->dataManager()->addModel("Tartim", raporModel, true);
mRapor->designReport();
Well, the problem is when I push the showReport button second time it raise error because I wanted to load same model second time.
How can I check if the same model name loaded before? Or can I clean the model from dataManeger when I close preview or print the report? Maybe this is better for memoryleak?
P.S: I can not drag the model fields on the report page with mouse! Is it because of the readonly Model?...
Regards,
Mucip:)