Home > OS >  How to make model motionless?
How to make model motionless?

Time:12-23

I have a model. And when I drag this model with the mouse or mouse wheel, it shifts. How to make the model not move.

This is model before dragging. the model is highlighted

This is model before dragging. the model is highlighted

This is the model after dragging it

This is the model after dragging it

CodePudding user response:

Have a look at this recent SO question.

GridView is a Flickable and Flickable was made for mobile use. You need to set the property boundsBehavior to Flickable.StopAtBounds. The default is Flickable.DragAndOvershootBounds. Have a look at the Flickable documentation.

This fixes the overshoot behavior, but if enough items are in your GridView it can still be dragged/flicked by the user. To deactivate that you need to set interactive to false. If you do so you need to make sure that your users can still scroll the GridView to reach all the items that are potentially out of view. Probably you need to decorate the Flickable/GridView with a ScrollView.

TL;DR Set the interactive property to false on your Flickable/GridView/ListView that is showing your model data.

  • Related