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?
Forum Update on Monday, May 27th 2025

How to add parsed html into my Application?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.0k 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 27 Sept 2017, 14:27 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

    J 1 Reply Last reply 28 Sept 2017, 05:45
    0
    • A aysenur
      27 Sept 2017, 14:27

      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

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 28 Sept 2017, 05:45 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 28 Sept 2017, 13:31
      1
      • J jsulm
        28 Sept 2017, 05:45

        @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 28 Sept 2017, 13:31 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.

        J 1 Reply Last reply 28 Sept 2017, 13:34
        0
        • A aysenur
          28 Sept 2017, 13:31

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

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 28 Sept 2017, 13:34 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 28 Sept 2017, 13:47
          1
          • J jsulm
            28 Sept 2017, 13:34

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

            A Offline
            A Offline
            aysenur
            wrote on 28 Sept 2017, 13:47 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

            1/5

            27 Sept 2017, 14:27

            • Login

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