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. C++ (PyQt5) object set on property value not deleted after overwriting with QQuickItem::setProperty
Forum Updated to NodeBB v4.3 + New Features

C++ (PyQt5) object set on property value not deleted after overwriting with QQuickItem::setProperty

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 131 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.
  • P Offline
    P Offline
    patrickkidd
    wrote on last edited by
    #1

    Consider a Qml component with property var mine: Mine {} at the root level using a Mine QObject class defined in C++ (or rather Python via PyQt5). If I overwrite that mine property with QQuickItem::setProperty, that default Mine object seems to not be deleted. I tested this by printing a value from a timer started with QObject::startTimer from the Mine C++ definition.

    How is object deletion handled in Qml? Shouldn't the default value be deleting when I overwrite that property value with ```QQuickItem::setProperty````. Or maybe this has more to do with python keeping a reference around?

    https://alaskafamilysystems.com/

    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