Write python bindings

Is it possible to bind C++ functions in namespace using PythonQt?

For example I have:

namespace dbcore {
///
/// \brief createDB creates new database as a DEFAULT connection
/// \param fullName
/// \return NOT opened DB
///
QSqlDatabase Q_COLADA_APP_EXPORT createDB(const QString &prjPath, QString &prjName){
  if (QFileInfo(prjName).suffix().compare("db", Qt::CaseInsensitive) != 0) {
    prjName += ".db";
  }
  QDir dir(prjPath + "/" + prjName);
  QString DBFullName = dir.absolutePath();
  QSqlDatabase DB =
      QSqlDatabase::addDatabase("QSQLITE"); // it will be default connection
  DB.setDatabaseName(DBFullName);
  return DB;
}

} // dbcore

and I’m thinking to make python bindings for dbcore::createDB(const QString &prjPath, QString &prjName) function.
Using WRAP_PYTHONQT flag inside cmake script doesn’t work of course.
I guess it should be done in similar way as it is done in PythonQt tests but here I bind function and not a class…

Maybe somebody has experience of doing that?