Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved How to add parsed html into my Application?

    General and Desktop
    2
    5
    751
    Loading More Posts
    • 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.
    • A
      aysenur last edited by

      Hi,
      I have parsed a web page and get a part of the web page into a QString object. I have tried to get the title into a Qlabel it was OK. Now I want to add the button between the tags into my application. How to do it? Can I add this button into my QWebEngineView?
      Thank you in advance

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @aysenur last edited by

        @aysenur Why don't you just load this HTML in QWebEngineView? http://doc.qt.io/qt-5/qwebengineview.html#setContent

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        A 1 Reply Last reply Reply Quote 1
        • A
          aysenur @jsulm last edited by

          @jsulm Thank you for your answer. I don't want to load the whole web page, I want to take just the parts that I need in to my application. How can I load this html to QWebEngineView, for loading I need Url but here I have html string.

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @aysenur last edited by

            @aysenur http://doc.qt.io/qt-5/qwebengineview.html#setContent

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            A 1 Reply Last reply Reply Quote 1
            • A
              aysenur @jsulm last edited by

              @jsulm Thank you again. From the link void QWebEngineView::setHtml(const QString &html, const QUrl &baseUrl = QUrl()) method solved my problem.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post