Qt::Literals Namespace
namespace Qt::Literals리터럴 인라인 네임스페이스는 Qt 유형에 대한 리터럴 연산자를 선언합니다. 더 보기...
| Header: | #include <QString> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core)target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
네임스페이스
| namespace | StringLiterals |
네임스페이스
namespace Literals::StringLiterals
인라인 Qt::Literals::StringLiterals 네임스페이스는 Qt 문자열 유형에 대한 리터럴 연산자를 선언합니다. Literals 및 StringLiterals 네임스페이스는 모두 인라인으로 선언되므로 이 네임스페이스의 심볼은 다음 중 하나를 코드에 추가하여 액세스할 수 있습니다:
// Makes visible only the literal operators declared in StringLiterals using namespace Qt::StringLiterals; // same, but needlessly verbose: using namespace Qt::Literals::StringLiterals; // Makes visible literal operators declared in all inline namespaces // inside Literals using namespace Qt::Literals; // Makes visible all symbols (including all literal operators) declared // in the Qt namespace using namespace Qt;
후자는 권장하지 않는데, Qt가 Qt::Literals 내의 다른 네임스페이스에 충돌하는 연산자를 추가하는 경우 원하는 리터럴 연산자를 선택할 수 없기 때문입니다.
© 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.