QSqlDatabase
RAW

    for (int id = 0; id < 100; ++id) {
        auto t = new QThread;
        connect(t, &QThread::started, this, [=] {
            QSqlDatabase db = QSqlDatabase::addDatabase(QStringLiteral("QMYSQL"), QString::number(id));
            db.open();
        });
        t.start();
    }