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. Print preview in QWebEngineView not working

Print preview in QWebEngineView not working

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 1.2k 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.
  • M Offline
    M Offline
    minocodi
    wrote on last edited by
    #1

    Hello , this is my first Question i hope i get an answer to it .
    ( you may excuse me , my English is not so good :) )

    i have a web application for Queue manager and i want to display the screen part
    ( where the costumer click on a chosen operation and he get a printed small ticket )
    on full screen mode , so i made a python QT5 web browser

    import sys
    
    from PyQt5.QtCore import QUrl
    from PyQt5.QtWidgets import QApplication
    from PyQt5.QtWebEngineWidgets import QWebEngineView
    from PyQt5.QtGui import QIcon
    
    from xml.dom import minidom
    xmldoc = minidom.parse('config.xml')
    itemlist = xmldoc.getElementsByTagName('item')
    
    app = QApplication(sys.argv)
    
    wv = QWebEngineView()
    wv.setWindowTitle('QueueManager')
    wv.setWindowIcon(QIcon('favicon.ico'))
    
    if itemlist[1].attributes['mode'].value=='fullscreen' :
        wv.showFullScreen()
    else:
        wv.showMaximized()
    
    wv.load(QUrl(itemlist[0].attributes['url'].value))
    wv.show()
    
    app.exec_()
    

    - config.xml contain the url and display mode

    until now the program work fine
    0_1503950674417_queue.jpg

    but when i click on one of the operations there is no preview or ticket in the queue list of the printer

    for example in chrome browser the result will be a default preview of the ticket than i decide to print it (pdf or .... )

    i just whon't to know if the QWebEngineView allow this functionality ( listen to the print event from the loaded html page and trigger the printer device)
    if yes, should i add some configuration or some modules to tested ?

    i hope i explained my problem well !

    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