摘要: QT += core sql #include <QSqlQuery> QStringList drivers = QSqlDatabase::drivers(); foreach(QString driver, drivers) qDebug() << driver; //添加数据库驱动 QSql 阅读全文
posted @ 2025-05-30 16:01 liliyou 阅读(31) 评论(0) 推荐(0)
摘要: netstat -an | find ":" /c 阅读全文
posted @ 2025-05-30 11:43 liliyou 阅读(21) 评论(0) 推荐(0)
摘要: // 构建JSON对象 QJsonObject json; json.insert("state", "error"); json.insert("age", 11); // 构建JSON文档 QJsonDocument document; document.setObject(json); // 阅读全文
posted @ 2025-05-30 11:31 liliyou 阅读(75) 评论(0) 推荐(0)
摘要: 获取选择的值 int index = ui->comboBox->currentIndex(); QString value = ui->comboBox->itemText(index); qDebug() <<" comboBox选中的值="<<value; 设置选择项: ui->comboBo 阅读全文
posted @ 2025-05-30 11:20 liliyou 阅读(23) 评论(0) 推荐(0)