Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [solved]How to repaint a Qt component from inside QML??
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 8.7k 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.
  • X Offline
    X Offline
    xardas008
    wrote on last edited by
    #1

    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??

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xardas008
      wrote on last edited by
      #2

      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.

      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