Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTextBrowser set link , can't make it clickble
Forum Updated to NodeBB v4.3 + New Features

QTextBrowser set link , can't make it clickble

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    umen242
    wrote on last edited by
    #1

    Im using QTextBrowser , and setting it with link like this :

    @QString url = "http://developer.qt.nokia.com/doc/qt-4.8/qtextbrowser.html#source-prop";

    textBrowser->setOpenExternalLinks(true);
    textBrowser->setHTML(url);
    or with 
    textBrowser->setSource(QUrl(url));
    

    or even :
    QString u = "<a >"+url+"</a>";
    textBrowser->setHTML(u);@

    but nothing happens , if i add the setSource i dont even see the fonts

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RazrFalcon
      wrote on last edited by
      #2

      http://pastebin.com/serh7RRh

      PS: I can't paste it as a code...

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        QTextBrowser does not load content from the interwebs automatically.

        "QTextBrowser openExternalLinks property":/doc/qt-4.8/qtextbrowser.html#openExternalLinks-prop

        bq. Specifies whether QTextBrowser should automatically open links to external sources using QDesktopServices::openUrl() instead of emitting the anchorClicked signal. Links are considered external if their scheme is neither file or qrc.

        "QTextBrowser source property":/doc/qt-4.8/qtextbrowser.html#source-prop

        bq. When setting this property QTextBrowser tries to find a document with the specified name in the paths of the searchPaths property and directory of the current source, unless the value is an absolute file path. It also checks for optional anchors and scrolls the document accordingly

        If you want to load web content, use a [[Doc:QWebView]] instead.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved