Results 1 to 9 of 9

Thread: Problem With QWebView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem With QWebView

    Hi.
    I have problem with QWebView (QWebPage)

    Need make script for load html page like:


    Qt Code:
    1. QWebView * view = new QWebView();
    2. connect(view, SIGNAL(linkClicked ( const QUrl & )), this, SLOT(newsOnLinkClicked ( const QUrl & )));
    3. view->load(QUrl("http://newsroot.net"));
    4. view->show();
    To copy to clipboard, switch view to plain text mode 
    Works fine.
    Problem there need open all links in default browser like Firefox or IE.

    I try all settings.
    Qt Code:
    1. QWebPage * wpage = new QWebPage ();
    2. connect(wpage, SIGNAL(linkClicked ( const QUrl & )), this, SLOT(newsOnLinkClicked ( const QUrl & )));
    3. wpage->setLinkDelegationPolicy (QWebPage::DelegateAllLinks);
    4. QWebView * view = new QWebView();
    5. wpage->triggerAction(QWebPage::OpenLink,true);
    6. view->triggerPageAction(QWebPage::OpenLink,true);
    7. connect(view, SIGNAL(linkClicked ( const QUrl & )), this, SLOT(newsOnLinkClicked ( const QUrl & )));
    8. wpage->setView(view);
    9. view->load(QUrl("http://newsroot.net"));
    10. view->show();
    To copy to clipboard, switch view to plain text mode 
    Possible some lines not need.

    Please help.
    Last edited by jpn; 24th March 2008 at 14:41. Reason: missing [code] tags

Similar Threads

  1. PyQt QTimer problem { FIXED }
    By WinchellChung in forum Newbie
    Replies: 0
    Last Post: 1st March 2008, 16:50
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  4. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.