I think my problem is simple to solve, but due to my lack of knowledge, I can't find the answer.
I have this structure :
struct variableOutil {
std::string Nom;
float Valeur;
std::string Module;
std::string Unite;
std::string Format;
std::string Accesibilite;
std::string Description ;
};
And the problem come from here :
struct variableOutil ToleranceTensionAvion;
ToleranceTensionAvion.Nom = "ToleranceTensionAvion";
QTableWidgetItem* newItem = new QTableWidgetItem();
newItem->setText(ToleranceTensionAvion.Nom);
this->ui->variableTableWidget->setItem(1,0,newItem);
I've got this error :
No matching function for call to 'QTableWidgetItem::setText(std::string&)
The problem is that setText need a const QString &text
and tell me that I put in parameter a std::string&
, I don't understand why does the type don't match, and what's the difference, after all, this is a simple String.
Thank you.