Qt World Summit: Submit your Presentation

QWebKit - QWebElement - how to find QPainter object

  • Hi,

    I am trying to force element of web page to be rendered once again. QWebElement has method render() which requires QPainter object. I was not able to find any way on which I could get current QPainter which can be passed to this method.
    Do you have an idea how to obtain one?

    My webview is derivatived from QGraphicsWebView and I override mousePressEvent to be able to make some modification on Web Element.


  • Hi,

    Anyone has some idea?

    Best regards,

  • You can create one, for instance on a QImage object. Something like:

    QImage targetImage;
    QPainter p(&targetImage);

Log in to reply