Hi,
I am new to Qt environment. I want to create a help dialog. Dialog will get the details from HTML file which intern include a javascript file and Cascading Style sheet. If I run the HTML in Internet Explorer 6/7 then HTML content will display with proper actions which is written in javascript.
I used QTextEdit which display the content but not icons and actions which specified in javascript file.
I used QLabel which display everything , but action specified in javascript is not executing.
At last I used even QtWebKit. There also it doesn't work. The code which I used is
QFile file("run.html");
txtEdit = new QWebView(this);
txtEdit ->settings()->setAttribute(QWebSettings::JavascriptEnabled,true );
txtEdit ->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindo ws,true);
txtEdit ->settings()->setAttribute(QWebSettings::JavascriptCanAccessCli pboard,true);
if (file.open(QIODevice::ReadOnly|QIODevice::Text))
{
txtEdit ->setHtml(file.ReadAll());
}
txtEdit->setGeometry(20,20,500,500);
mainLayout->addWidget(txtEdit);
setMinimumSize(600,600);
I have attached 2 files. Please copy Images file inside the HTMLtextDisplay folder after extracting both. run the html file in Internet Explorer.
This look and feel i need to develop in Qt.
Bookmarks