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. const QModelIndex &child = index.child(i, 0) is deprecated

const QModelIndex &child = index.child(i, 0) is deprecated

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 2.4k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    how can I replace it?

    jsulmJ 1 Reply Last reply
    0
    • ? A Former User

      how can I replace it?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @vale88 Explained here: https://doc.qt.io/qt-5/qmodelindex-obsolete.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        As documentation states:

        Use QAbstractItemModel::index() instead.

        So, something like:

        const QModelIndex &child = model.index(i, 0, index); 
        

        (Z(:^

        ? 1 Reply Last reply
        2
        • sierdzioS sierdzio

          As documentation states:

          Use QAbstractItemModel::index() instead.

          So, something like:

          const QModelIndex &child = model.index(i, 0, index); 
          
          ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          @sierdzio thenks

          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