c++ - Error while geting html code -



c++ - Error while geting html code -

i'm trying html code using qnetworkaccessmanager, doesn't work. result of reply in programme site, need html. how can convert it?

widget::widget(qwidget *pwgt): qwidget(pwgt) { field = new qtextedit(this); qnetworkreply *reply = manager.get(qnetworkrequest(qurl("http://www.google.com"))); qeventloop loop; connect(reply, signal(finished()), &loop, slot(quit())); loop.exec(); qstring text = reply->read(); field->settext(text); }

from qt documentation :

void qtextedit::settext(const qstring & text) [slot]

sets text edit's text. text can plain text or html , text edit seek guess right format.

use sethtml() or setplaintext() straight avoid text edit's guessing.

you can utilize qtextedit::setplaintext sets text editor's contents plain text.

html c++ qt

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -