QGraphicsWebView transformation and wrong mouse coordintaes on SWF



  • Hello,
    I have a problem with QGraphicsWebView when it's using transformation (i.e. rotation, non uniform scaling) and mouse position - mouse position is simply wrong and it don't take into account item transformations.
    When view is transformed it seams to work fine.

    Any idea how to correct this fast? Currently I'm trying to map back position manually (still work in progress - position is a little bit more accurate but some quirks still require correction) .

    Example code:

            QGraphicsScene *scene = new QGraphicsScene();
            QGraphicsView *vvv = new QGraphicsView( scene);
            QGraphicsWebView *r = new QGraphicsWebView();
            r->setFlag( QGraphicsItem::ItemIsMovable, true);
            r->setFlag( QGraphicsItem::ItemIsSelectable, true);
            r->setAcceptHoverEvents( true);
            r->setHtml( content()); // HTML that displays SWF content - SWF object is vimeo player that has mouse hover 
            scene->addItem( r);
            r->setRotation( 25.);
            vvv->resize( 700, 700);
            vvv->show();
    

    Thanks in advance for any suggestion.



  • Also when item transformation are applied mouse position is wrong.
    Any suggestions?


Log in to reply
 

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