In questa pagina

QLatin1Char Struct

La classe QLatin1Char fornisce un carattere ASCII/Latin-1 a 8 bit. Per saperne di più...

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

Nota: tutte le funzioni di questa struttura sono rientranti.

Funzioni pubbliche

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

Descrizione dettagliata

Questa classe è utile esclusivamente per costruire un oggetto ` QChar ` con caratteri a 8 bit.

Vedi anche QChar, QLatin1StringView e QString.

Documentazione sulle funzioni membro

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

Crea un carattere Latin-1 per c. Questo costruttore va utilizzato quando si sa che la codifica del carattere in ingresso è Latin-1.

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

Converte un carattere Latin-1 in una rappresentazione ASCII a 8 bit dello stesso carattere.

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

Converte un carattere Latin-1 in una rappresentazione Unicode del carattere codificata a 16 bit.

Elementi correlati non membri

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

Operatore letterale che crea un oggetto ` QLatin1Char ` a partire da ` ch`.

Il codice seguente crea un ` QLatin1Char`:

using namespace Qt::StringLiterals;

auto ch = 'a'_L1;

Questa funzione è stata introdotta in Qt 6.4.

Vedi anche ` 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.