Qt 6.11 is out! See what's new in the release
blog
QGraphicsWebView transformation and wrong mouse coordintaes on SWF
General and Desktop
2
Posts
1
Posters
689
Views
1
Watching
-
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.