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

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -