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).
Could you confirm my reasoning please?