QLatin1Char Struct

Die Klasse QLatin1Char liefert ein 8-Bit-ASCII/Latin-1-Zeichen. Mehr...

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

Hinweis: Alle Funktionen in dieser Struktur sind reentrant.

Öffentliche Funktionen

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

Detaillierte Beschreibung

Diese Klasse ist nur nützlich, um eine QChar mit 8-Bit-Zeichen zu konstruieren.

Siehe auch QChar, QLatin1StringView, und QString.

Dokumentation der Mitgliedsfunktionen

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

Konstruiert ein Latin-1-Zeichen für c. Dieser Konstruktor sollte verwendet werden, wenn die Kodierung des Eingabezeichens als Latin-1 bekannt ist.

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

Konvertiert ein Latin-1-Zeichen in eine 8-Bit-ASCII-Darstellung des Zeichens.

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

Konvertiert ein Latin-1-Zeichen in eine 16-Bit-kodierte Unicode-Darstellung des Zeichens.

Verwandte Nicht-Mitglieder

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

Literaler Operator, der aus ch ein QLatin1Char erzeugt.

Der folgende Code erzeugt ein QLatin1Char:

using namespace Qt::Literals::StringLiterals;

auto ch = 'a'_L1;

Diese Funktion wurde in Qt 6.4 eingeführt.

Siehe auch Qt::Literals::StringLiterals.

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