Results 1 to 12 of 12

Thread: How to add subitem in treewidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Oct 2007
    Posts
    201
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    19
    Thanked 1 Time in 1 Post

    Default Re: How to add subitem in treewidget

    Quote Originally Posted by yogeshgokul View Post
    Isn't it clear with function name itself "addChild" ?
    Call addChild(), from the reference of the parent item. And new item will be added as child.
    I think i didn't able to describe my problem properly. In my application, if i dbl click on tree widget a context menu ll pop up, having 2 option, either to add classroom or computers. after adding classroom i need to add some computers to a perticular classroom. I'm not able how to add the child. I've added my code. in my mainwindow i've amethod like addComputers()
    here i m not able how to add the computers under the perticular class i've choosen.
    Attached Files Attached Files
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

Similar Threads

  1. treewidget and a message system
    By alisami in forum Qt Programming
    Replies: 7
    Last Post: 27th July 2008, 18:05
  2. How to set the sizehint for treeWidget
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 12th June 2007, 11:35
  3. By default TreeWidget width setting in DockWidget
    By santosh.kumar in forum Qt Programming
    Replies: 0
    Last Post: 31st May 2007, 05:55
  4. Replies: 2
    Last Post: 29th May 2007, 13:55
  5. How i will use treeWidget of GUI class in thread class
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 15th May 2007, 15:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.