Despite some searchs, I wasn't able to find a way to auto-generate getters and setters for a C++ class, using QT Creator 2.3.1. Would you guys know some way to do so ?
this->attributes['last_name']; } } The above Model which has function setPasswordAttribute will save the password with bcrypted value (which is basically called Setters or Mutators), And the function getFullNameAttribute will append first name and last name retrived from database (which is called Getters or Accessors)
Do a right click on your member then Refactor
then Generate Getter and Setter member function
and you're done :)
On Qt Creator 3.2.x, create the member, then click on it and press alt+Enter :
Position your text cursor at the member variable in class definition, then hit Alt+Enter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With