开发者

QTextEdit and QTextDocument buffer problem?

I have a string. It has about 80000 line.I try to write

QTextDocument * textDocument=new QTextDocument();
textDocument->setHtml(list); //list is my string
txtEdit->setDocument(textDocument);

if string is not contain 开发者_如何学Python80000 line, it can show records.But if has 80000 line, it can not show anything.

Do you have any solution about this problem? Thanks a lot.


Are you sure it's a problem with the QString itself? Did you tried to output the QString to the console (or called QString::size()) to make sure all the content is stored?

May be it's a limitation that comes from QTextEdit or QTextDocument and not QString.

Also, you could call QString::capacity() to be sure of how much characters you can store in your QString :

int maximumNumberOfChars = list.capacity();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜