Auf dieser Seite

QLatin1Char Struct

Die Klasse „QLatin1Char“ stellt ein 8-Bit-ASCII-/Latin-1-Zeichen bereit. Mehr...

Header: #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)

Ausführliche Beschreibung

Diese Klasse dient ausschließlich dazu, eine „ QChar “ mit 8-Bit-Zeichen zu erstellen.

Siehe auch „ QChar “, „ QLatin1StringView “ und „ QString “.

Dokumentation der Mitgliedsfunktionen

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

Erzeugt ein Latin-1-Zeichen für „ c “. Dieser Konstruktor sollte verwendet werden, wenn bekannt ist, dass die Kodierung des Eingabezeichens Latin-1 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)

Literaloperator, der aus „ ch “ ein „ QLatin1Char “ erstellt.

Der folgende Code erstellt ein ` QLatin1Char`:

using namespace Qt::StringLiterals;

auto ch = 'a'_L1;

Diese Funktion wurde in Qt 6.4 eingeführt.

Siehe auch „ 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.