Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-17517

MouseHover on QGraphicsScene

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 4.8.0, 5.0.0
    • 4.7.1
    • Widgets: GraphicsView
    • None
    • WinXp, VS05, x32
    • 15c14584199dc43e4a309fc331f3144009008128

    Description

      Compare of the Lines in QGraphicsView.cpp: 2169 and in QGraphicsScene.cpp: 1086.

      I modified the second Line to see the different better.

      return d->scene->items(xinv.mapRect(QRectF(pos.x(), pos.y(), 1, 1)) , Qt::IntersectsItemShape, Qt::DescendingOrder, viewportTransform());

      return q->items(QRect(scenePos, QSizeF(1, 1)) , Qt::IntersectsItemShape, Qt::DescendingOrder, view->viewportTransform());

      First Line (qgraphicsview) passes the constant size(1,1) throught the matrix, which scales selection area (in this case selection point) and second line (qgraphicsscene) had a selection area with size (1,1) without transformation.

      This cause to select a bigger area if the view is scaled.

      Attachments

        1. main.cpp
          0.7 kB
          Qt Support
        2. tooltip.jpg
          12 kB
          Qt Support
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            w00t Robin Burchell
            enderdogan Ender DOGAN
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews