Important: Please read the Qt Code of Conduct -

[solved]How to repaint a Qt component from inside QML??

  • Hello,

    I have one component which gets painted from inside of Qt (derived from QGraphicsViewItem). Now when I lay a rectangle over this component and use drag & drop to move it around, I need to repaint the Qt component. When i switch the focus of the window to another application it gets repainted.

    Is there a possibility to tell QML to repaint all or just the needed component when I drag another one??

  • Ok problem solved. I added a slot to my Qt component, and to the qml component which I drag a signal which gets emitted everytime I drag this item so I'm able to call the slot of the Qt component which will call the update() method to repaint itself.

Log in to reply