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.

    Thanks.



  • Hi,

    Anyone has some idea?

    Best regards,



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

    @
    QImage targetImage;
    QPainter p(&targetImage);
    theWebElement->render(&p);
    @


Log in to reply
 

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