iamjayanth
6th July 2009, 12:13
Sir,
I am trying to use html in QTextBrowser..I have a Html file in my filesystem...
I am trying to print that on a QTextBrowser....But I cant...
This is the code that I used..
QTextBrowser * browser;
browser=new QTextBrowser(frame);
QFile file(filename);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
qWarning("file not found");
return;
}
while (!file.atEnd())
{
QByteArray line = file.readLine();
browser->setHtml(QString(line));
}
What am i missing....
I am trying to use html in QTextBrowser..I have a Html file in my filesystem...
I am trying to print that on a QTextBrowser....But I cant...
This is the code that I used..
QTextBrowser * browser;
browser=new QTextBrowser(frame);
QFile file(filename);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
qWarning("file not found");
return;
}
while (!file.atEnd())
{
QByteArray line = file.readLine();
browser->setHtml(QString(line));
}
What am i missing....