The linker is telling you that you didn't define the virtual QVariant CBDatabase::data(QModelIndex const &,int) const
member of your CBDatabase
class. The missing member does not come from Qt, it's part of your own code. The issue has nothing to do with Qt. To reproduce it, the following suffices (that's the whole thing, doesn't need linking with Qt):
class QModelIndex {};
class QVariant {};
class CBDatabase {
public:
// declaration, no definition
virtual QVariant data(const QModelIndex &, int) const;
};
int main() {
CBDatabase db;
db.data(QModelIndex(), 0);
}