Results 1 to 1 of 1

Thread: get selected object from tree widget.

  1. #1
    Join Date
    Jul 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default get selected object from tree widget.

    Hello all,

    I am a Maya 2011 user and I am testing some functionality in QT. The reason why I mention Maya 2011 is because Maya only uses the .ui file and nothing else. So I am not able to use any of the other QT files (.cpp or .h)

    I have the following problem.

    1) I have a button with a dynamic string property (-command)
    2) I have a Tree Widget with some items in it
    3) I would like that when I press the button the button gives the following command
    myCommand(items selected in list)

    4) I do not know how to get the items that are selected in the Tree Widget and give them to the button.

    I have attached an example file.
    mainwindow.ui

    Any suggestions or tips would be most welcome !
    Thanks.
    Red
    Attached Files Attached Files

Similar Threads

  1. Tree View Item selected rectangle
    By LynneV in forum Qt Programming
    Replies: 2
    Last Post: 28th May 2010, 16:17
  2. Tree Widget
    By bismitapadhy in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2009, 07:31
  3. Qt Tree Widget Question
    By alavtec in forum Qt Programming
    Replies: 2
    Last Post: 16th July 2008, 16:21
  4. Drag from tree widget
    By EricF in forum Qt Programming
    Replies: 9
    Last Post: 17th December 2007, 23:09
  5. Replies: 12
    Last Post: 7th February 2007, 13:30

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.