QTextDocument::setHtml slow

I used the following code to convert html to plain text:

QTextDocument doc;

doc.setHtml( html);

QString txt= doc.toPlainText();

Things went well until one day the program hang. After debugging, it turns out QTextDocument::setHtml freezes. It is not completely dead but very slow. This is not normal because it worked well in the past. By searching the Internet, the only post I got is this. However, it does not answer why QTextDocument::setHtml is so slow. It seems to load some external resource. Can anybody help me?

 

 

Did you like this?
Tip admin with Cryptocurrency

Donate Bitcoin to admin

Scan to Donate Bitcoin to admin
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to admin

Scan to Donate Bitcoin Cash to admin
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to admin

Scan to Donate Ethereum to admin
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to admin

Scan to Donate Litecoin to admin
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to admin

Scan to Donate Monero to admin
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to admin

Scan to Donate ZCash to admin
Scan the QR code or copy the address below into your wallet to send some ZCash:
Posted in

Comments are closed, but trackbacks and pingbacks are open.