Sur cette page

QLatin1Char Struct

La classe QLatin1Char fournit un caractère ASCII/Latin-1 de 8 bits. En savoir plus...

En-tête : #include <QLatin1Char>
CMake : find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake : QT += core

Remarque : toutes les fonctions de cette structure sont réentrantes.

Fonctions publiques

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

Description détaillée

Cette classe sert uniquement à construire une chaîne de caractères « QChar » composée de caractères 8 bits.

Voir également QChar, QLatin1StringView et QString.

Documentation des fonctions membres

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

Construit un caractère Latin-1 à partir de c. Ce constructeur doit être utilisé lorsque l'on sait que le caractère d'entrée est encodé en Latin-1.

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

Convertit un caractère Latin-1 en une représentation ASCII 8 bits de ce caractère.

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

Convertit un caractère Latin-1 en une représentation Unicode de ce caractère codée sur 16 bits.

Éléments associés non membres

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

Opérateur littéral qui crée une ` QLatin1Char ` à partir de ` ch`.

Le code suivant crée une instance de ` QLatin1Char` :

using namespace Qt::StringLiterals;

auto ch = 'a'_L1;

Cette fonction a été introduite dans Qt 6.4.

Voir aussi 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.