このページでは

変更点Qt SQL

Qt 6における変更点は、フレームワークをより効率的で使いやすくするための意図的な取り組みの結果です。

各リリースにおいて、すべての公開 API についてバイナリおよびソースの互換性を維持するよう努めています。しかし、Qt をより優れたフレームワークにするためには、いくつかの変更が避けられませんでした。

このトピックでは、Qt SQL におけるそれらの変更点をまとめ、それらに対処するためのガイダンスを提供します。

QSqlQuery クラス

boundValues() のシグネチャ

boundValues() の戻り値の型が、QMap<QString,QVariant> からQVariantList に変更されました。順序は信頼できるため、準備されたクエリ内のバインディングの順序となります。次のようなコードを変更してください:

QMap<QString, QVariant> values = boundValues();
int id = values[":id"].value().toInt();
QList<QVariant> values = boundValues().values();
int id = values.at(0).toInt();

を次のように変更してください:

QList<QVariant> values = boundValues().values();
int id = values.at(0).toInt();

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.