Important: Please read the Qt Code of Conduct -

Subclassing QSqlDatabase

  • Hi

    I want to add some backup/restore and transform functionality to my databases. Currently I have a singleton pattern class wrapping a QSqlDatabase. I wonder if this way is good or not.

    Is this a good idea to subclass a QSqlDatabase instead? How can I solve conversion between QSqlDatabase and my new class to make it possible to use QSqlDatabase::addDatabase ?

Log in to reply