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. How to add parsed html into my Application?
Qt 6.11 is out! See what's new in the release blog

How to add parsed html into my Application?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.6k Views
  • 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 Offline
    A Offline
    aysenur
    wrote on last edited by
    #1

    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

    jsulmJ 1 Reply Last reply
    0
    • A aysenur

      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

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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
      1
      • jsulmJ jsulm

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

        A Offline
        A Offline
        aysenur
        wrote on last edited by
        #3

        @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.

        jsulmJ 1 Reply Last reply
        0
        • A aysenur

          @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.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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
          1
          • jsulmJ jsulm

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

            A Offline
            A Offline
            aysenur
            wrote on last edited by
            #5

            @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
            0

            • Login

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