Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.4.0
-
None
-
Virtual system :
- Windows Embedded Standard 32 bits
- VMWare virtual machine
- Intel Core i7, 3.40GHz
-
f0cd18706f (qt/qtbase/dev) f0cd18706f (qt/tqtc-qtbase/dev)
Description
Are instanciated : a QGraphicsView sets with a QGraphicsScene, a QGraphicsItem inserted in the scene.
When the item is moved with the mouse and reaching one edge of the view, it 'jumps' several tens of pixel far from its position (it is also visible with the vertical/horizontal scrollbar(s) : their size 'jumps' too at the same time the item 'jumps'). Then when it is moved again, it returns at its correct position. This issue only occurs the first time the view is instantiated and only the first time the item reaches an edge.
Example of code :
Main.cpp
#include <QApplication> #include <QGraphicsView> #include <QGraphicsEllipseItem> int main(int argc, char* argv[]) { QApplication app(argc, argv); QGraphicsView l_view; l_view.setFixedSize(800,800); l_view.show(); QGraphicsScene l_scene; l_view.setScene(&l_scene); QGraphicsEllipseItem l_item(QRectF(20, 20, 20, 20)); l_item.setFlags(QGraphicsItem::ItemIsMovable); l_scene.addItem(&l_item); return app.exec(); }