I'm just realizing that what I was trying to do was maybe nonsense : I was trying to pass on to the mysql server a value for the client on which my Qt program is running i.e. I was trying to "deceive" the server. And I could understand then that there would be no such method in QSqlDatabase (and that you couldn't understand my question initially).
Thx so much @kshegunov , I had Q_OBJECT in abstract class, but I forgot to put it as well in derived class. This solve my problem :)
As a side note:
I saw several times in the forums here that people are not declaring their overrides as virtual, this is syntactically correct, but I would suggest doing it (makes the code more readable) or even better is to use C++11's override specifier.
Thx for this tip so much, I like this kind of notes which helps me improve the code. Yeah you're ride it looks more readable right now :)
virtual void itemToAdd(AbstractFood* item)=0;
void itemToAdd(AbstractFood* item) override;
void pizzaToCustomize(Pizza *pizza);
and we exactly know what was overriden from parent.