Максимальный размер QString в Qt

659
24 мая 2017, 08:05

Сколько вообще символов в QString вставить? Я смотрю там есть какой то лимит или я незнаю, короче часть символов просто режется при выводе или обработке при этом размер показывается тот же что и число символов с тем что размер фиксируется разный почему? Я конечно подсчитал кол-во символов (1019) но может это от системы зависит, я не знаю.

QString la =  "and the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embedded";
    qDebug() <<"la size=" <<la.length();
    qDebug() <<"la=" <<la;
    la += "Madoka Magika is my favorite anime";
    qDebug() <<"la2 size=" <<la.length();
    qDebug() <<"la2=" <<la;

Вывод:

la size= 1316
la= "and the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functiÉè&
la2 size= 1350
la2= "and the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functions, that return the minimum or maximum of two ... QString, QByteArray, and QVariant are three classes that have many things in ... C++ natively provides two kinds of strings: traditional C-style ' / 0'-terminated ... The length() function returns the size of the entire string, including embeddedand the qMin() and qMax() functÕê$ 
READ ALSO
Передача файлов через TCP

Передача файлов через TCP

Использую TCP-клиент и TCP-серверПередаю строку на сервер

208
Как создать bat файл с помощью c++?

Как создать bat файл с помощью c++?

Необходимо создать bat файл а дальше записать в него программныйПодскажите, пожалуйста, как это можно сделать, желательно привести пример

256
Минимальная сборка GDAL

Минимальная сборка GDAL

А вот существует ли сборка библиотеки GDAL с минимумом зависимостей? А то таскать с собой всю толпу библиотек не всегда удобно

290
Адаптация linux команд под windows

Адаптация linux команд под windows

Хотелось спросить совета по тому, в правильном направлении я двигаюсь или нетПо предмету операционные системы дали задачу, написать программу...

307