Results 1 to 3 of 3

Thread: Help Widget

  1. #1
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Help Widget

    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.
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Help Widget

    You can try to use QAssistantClient
    Last edited by THRESHE; 27th August 2008 at 13:59.
    C++ & AMD forever

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Help Widget

    From the docs -
    The QAssistantClient class provides a means of using Qt Assistant as an application's help tool. More...
    #include <QAssistantClient>
    This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
    So better not use it.

    As for QLabel, u need to use setOpenExternalLinks(true). but still in ur case, i tried with QLabel, but QLabel doesnt seem to have any knowledge of scripts i guess.

    As for QwebView,,,i havent used it before

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. Playbutton functionality
    By uchennaanyanwu in forum Qt Programming
    Replies: 5
    Last Post: 31st July 2008, 22:29
  3. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  4. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.