변경 사항 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();

© 2025 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.