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. How to get from QModelIndex to QTreeWidgetItem?

How to get from QModelIndex to QTreeWidgetItem?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.0k 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.
  • D Offline
    D Offline
    Dekken
    wrote on last edited by
    #1

    I am trying to find which QTreeWidgetItem a QModelIndex refers to?

    My birth assigned life form type is carbon-based but I identify as a copper-based life form ¯\(ツ)/¯

    eyllanescE 1 Reply Last reply
    0
    • D Dekken

      I am trying to find which QTreeWidgetItem a QModelIndex refers to?

      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by
      #2

      @Dekken

      • QTreeWidgetItem -> QModelIndex: https://doc.qt.io/qt-5/qtreewidget.html#indexFromItem

      • QModelIndex -> QTreeWidgetItem: https://doc.qt.io/qt-5/qtreewidget.html#itemFromIndex

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      1 Reply Last reply
      3
      • nageshN Offline
        nageshN Offline
        nagesh
        wrote on last edited by
        #3

        @Dekken as suggested by @eyllanesc both the indexFromItem & itemFromIndex are protected fucntions..

        1 Reply Last reply
        3

        • Login

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