Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is object passed to QStandardItemModel::setItemPrototype guaranteed to be freed?
Forum Updated to NodeBB v4.3 + New Features

Is object passed to QStandardItemModel::setItemPrototype guaranteed to be freed?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 509 Views
  • 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.
  • enemyofthedawnE Offline
    enemyofthedawnE Offline
    enemyofthedawn
    wrote on last edited by
    #1

    http://doc.qt.io/qt-5/qstandarditemmodel.html#setItemPrototype

    The model takes ownership of the prototype.

    Does it mean I don't have to delete it manually later?

    enemyofthedawnE 1 Reply Last reply
    0
    • enemyofthedawnE enemyofthedawn

      http://doc.qt.io/qt-5/qstandarditemmodel.html#setItemPrototype

      The model takes ownership of the prototype.

      Does it mean I don't have to delete it manually later?

      enemyofthedawnE Offline
      enemyofthedawnE Offline
      enemyofthedawn
      wrote on last edited by
      #2

      @enemyofthedawn Yes https://github.com/qt/qtbase/blob/a37dd93defd91b79fb6730d0ff0515a66a0d3972/src/gui/itemmodels/qstandarditemmodel.cpp#L2209

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved