Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. I need to print the content of the html sub-page and how to write the code
Forum Updated to NodeBB v4.3 + New Features

I need to print the content of the html sub-page and how to write the code

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 489 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
    allcorn
    wrote on last edited by
    #1

    In the process of developing qwebwngine, I need to call subpage printing.
    parent html code

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    </head>
    <body>
    <iframe src="print.html" id="printf" name="printf" frameborder="0" width="200"></iframe>
    <input type="button" value="print child" onclick="document.getElementById('printf').contentWindow.prints();" />
    </body>
    </html>
    

    child html code

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
    </head>
    
    <body>
        <p>child page!</p>
        <div id="name">im child page!</div>
    <script>
    function prints(){
    	window.print();
    }
    </script>
    </body>
    </html>
    

    I need to print the content of the sub-page and how to write the code,
    Do not print the buttons on the parent page.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      paulyu
      wrote on last edited by paulyu
      #2

      Have you solved it ? I meet the same issue now. I'm looking forward to your reply.

      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