Qt Labs Forum » General discussions

Help Widget

(1 post)
  • Started 2 months ago by navi1084

  1. navi1084
    navi1084
    Member

    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::JavascriptCanOpenWindows,true);
    txtEdit ->settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard,true);

    if (file.open(QIODevice::ReadOnly|QIODevice::Text))
    {
    txtEdit ->setHtml(file.ReadAll());
    }

    txtEdit->setGeometry(20,20,500,500);
    mainLayout->addWidget(txtEdit);
    setMinimumSize(600,600);

    Posted: 2 months #

RSS feed for this topic

Reply

You must log in to post.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.