Results 1 to 2 of 2

Thread: Change index of QComboBox delegate in a QTreeView ?

  1. #1
    Join Date
    Mar 2014
    Posts
    9
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Change index of QComboBox delegate in a QTreeView ?

    Hi,

    I have a problem with my code : I have QComboBox delegate that I've managed to configure almost perfectly. But I just don't know how to change the QComboBox index from the QTreeView associated model. Does anyone know how can I achieve this ?

    I hope I am clear enough.

    Thanks for your help

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Change index of QComboBox delegate in a QTreeView ?

    The delegate should get a call to its setEditorData() method when the data of the cell changes, allowing you to set the appropriate combobox index.

    Cheers,
    _

Similar Threads

  1. Replies: 5
    Last Post: 19th March 2014, 12:05
  2. accessing current index in QComboBox
    By uz_qt in forum Qt Programming
    Replies: 5
    Last Post: 29th August 2013, 15:05
  3. Replies: 2
    Last Post: 27th October 2012, 09:09
  4. How to get index of a combobox delegate selection
    By vieraci in forum Qt Programming
    Replies: 12
    Last Post: 21st July 2009, 16:37
  5. Value from QComboBox instead of Index
    By arunvv in forum Qt Programming
    Replies: 2
    Last Post: 17th May 2007, 22:24

Tags for this Thread

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.