Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsWebView transformation and wrong mouse coordintaes on SWF
Qt 6.11 is out! See what's new in the release blog

QGraphicsWebView transformation and wrong mouse coordintaes on SWF

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 689 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LuGRU
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      LuGRU
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved