QRangeModel::ItemAccess Struct
template <typename T> struct QRangeModel::ItemAccessItemAccess 템플릿은 QRangeModel 에서 개별 항목의 역할 데이터에 액세스하는 방법을 제어하는 사용자 지정 지점을 제공합니다. 더 보기...
이 구조체는 Qt 6.11에 도입되었습니다.
상세 설명
데이터 구조에 사용되는 유형에 맞게 이 템플릿을 특수화하고 readRole() 및 writeRole() 멤버를 구현하여 해당 유형의 역할별 데이터에 액세스하세요.
template <> struct QRangeModel::ItemAccess<ItemType> { static QVariant readRole(const ItemType &item, int role) { switch (role) { // ... } return {}; } static bool writeRole(ItemType &item, const QVariant &data, int role) { bool ok = false; switch (role) { // ... } return ok; } };
이 유형의 특수화는 미리 정의된 모든 동작보다 우선합니다. 소유하지 않은 유형에 대해서는 이 템플릿을 특수화하지 마세요. ItemAccess가 특수화된 유형은 암시적으로 multi-role items 로 해석됩니다.
© 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.