Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    [Solved] QWebElement::toOuterXml() only returns the first 102 characters?

    Qt WebKit
    1
    2
    617
    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.
    • C
      Chris79 last edited by

      Hi all,

      I want to get the complete HTML source of a page I just rendered in a QWebView.

      From what I understand from the doc I should be able to get the main document element and just put it out the way I tried it in the source below. This seems to work, but the result from toOuterXml() always ends after 102 characters. Any suggestion what is going on? Thanks!

      @
      QWebFrame *_frame = m_mainWindow->currentWebFrame();
      QWebElement _htmlElement = _frame->documentElement();
      QString _html = _htmlElement.toOuterXml();
      @

      Best
      Chris

      1 Reply Last reply Reply Quote 0
      • C
        Chris79 last edited by

        I just figured out the problem is limited to debug builds on osx. If I build release it works. Debug builds on linux work as well.

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