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. Corresponding Qt function
QtWS25 Last Chance

Corresponding Qt function

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 938 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.
  • sajis997S Offline
    sajis997S Offline
    sajis997
    wrote on last edited by
    #1

    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
    0
    • N Offline
      N Offline
      Nosf
      wrote on last edited by
      #2

      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
      0

      • Login

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