Print preview in QWebEngineView not working



  • 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 !


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.