Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Corresponding Qt function

    General and Desktop
    2
    2
    798
    Loading More Posts
    • 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.
    • sajis997
      sajis997 last edited by

      Hello forum.

      I am trying to port an wxwidget application to qt and i am stuck with the following function.

      [code]
      wxTreeItemId AppendItem(const wxTreeItemId& parent, const wxString& text, int image = -1, int selImage = -1, wxTreeItemData* data = NULL)
      [/code]

      The above code does the following:

      Appends an item to the end of the branch identified by parent, return a new item id. So it mean that the new item id is the child of the parent.

      I am looking for the corresponding function in qtreewidget, but did not find any ?

      Could some one in the forum refer me to the right place to look for?

      Regards
      Sajjad

      1 Reply Last reply Reply Quote 0
      • N
        Nosf last edited by

        If I understand what you require,

        You got a parent item and you want to be able to add an item to its list of children?

        If so maybe this "addChild":http://qt-project.org/doc/qt-4.8/qtreewidgetitem.html#addChild

        and then you can use "indexOfChild":http://qt-project.org/doc/qt-4.8/qtreewidgetitem.html#indexOfChild to get the inserted item's index.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post