Nesta página

QLatin1Char Struct

A classe QLatin1Char fornece um caractere ASCII/Latin-1 de 8 bits. Mais...

Cabeçalho: #include <QLatin1Char>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core

Observação: Todas as funções nesta estrutura são reentrantes.

Funções públicas

QLatin1Char(char c)
char toLatin1() const
char16_t unicode() const
(since 6.4) QLatin1Char operator""_L1(char ch)

Descrição detalhada

Esta classe serve apenas para construir um objeto ` QChar ` com caracteres de 8 bits.

Veja também ` QChar`, ` QLatin1StringView` e ` QString`.

Documentação das funções de membro

[explicit constexpr noexcept] QLatin1Char::QLatin1Char(char c)

Cria um caractere Latin-1 a partir de ` c`. Esse construtor deve ser usado quando se sabe que a codificação do caractere de entrada é Latin-1.

[constexpr noexcept] char QLatin1Char::toLatin1() const

Converte um caractere Latin-1 em uma representação ASCII de 8 bits desse caractere.

[constexpr noexcept] char16_t QLatin1Char::unicode() const

Converte um caractere Latin-1 em uma representação Unicode codificada em 16 bits desse caractere.

Não-membros relacionados

[constexpr noexcept, since 6.4] QLatin1Char operator""_L1(char ch)

Operador literal que cria um ` QLatin1Char ` a partir de ` ch`.

O código a seguir cria um ` QLatin1Char`:

using namespace Qt::StringLiterals;

auto ch = 'a'_L1;

Esta função foi introduzida no Qt 6.4.

Veja também ` Qt::Literals::StringLiterals`.

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