Qt 6: Replacement for QTextCodec
Unsolved
General and Desktop
-
-
Hi, yes I had a similar issue when upgrading to Qt6, I changed to using QStringConverter
Because I sometimes I to build for Qt 5.15.2 my code looks like this example:... // set the text encoding for the stream #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) ts.setCodec(bUtf8 ? "UTF-8" : "ISO 8859-1"); #else ts.setEncoding(bUtf8 ? QStringConverter::Utf8 : QStringConverter::Latin1); #endif ...
-
@hskoglund
Could you please explain better how to use the QTextStream instead the QTextCodec?
I am also porting the QuaZip using only the Qt 6 application (without the core5compat).
Thank you for your answers!