Results 1 to 8 of 8

Thread: QTreeWidget select item

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    70
    Thanked 59 Times in 57 Posts

    Default Re: QTreeWidget select item

    Hi,

    Thanks.

    The problem is that I don't have a model. I have readed about view/model programming but the problem is that I did wrote my code pure C++, creating LinkedLists manually, ... Then I decided wich toolkit to use and mixed the code. By this I use QTreeWidget instead of QTreeView, because I don't know how to convert my code to a model.

    I know that this lines of code are slow but it is not important.

    The problem of using a model/view interface is that I really don't know how to rewrite the code struct to use it.

    Thanks your help,
    Òscar Llarch i Galán

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QTreeWidget select item

    Of course you have a model. QTreeWidget uses an internal model that uses QTreeWidgetItems, so you can call model methods like you would for real models, so the delegate approach is still valid.

  3. The following user says thank you to wysota for this useful post:

    ^NyAw^ (26th October 2007)

Similar Threads

  1. Inserting Item to a QTreeWidget from Thread?
    By vishal.chauhan in forum Qt Programming
    Replies: 3
    Last Post: 23rd June 2007, 11:23
  2. Cannot select an item in QComboBox
    By Declan in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2007, 08:08
  3. QTreeWidget item editing: want column specificity
    By McKee in forum Qt Programming
    Replies: 12
    Last Post: 10th December 2006, 22:12
  4. Removing items properly from qtreewidget item
    By Djony in forum Qt Programming
    Replies: 6
    Last Post: 21st November 2006, 12:20
  5. insert Item to my QTreeWidget
    By raphaelf in forum Qt Programming
    Replies: 7
    Last Post: 28th February 2006, 15:42

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.