Results 1 to 2 of 2

Thread: How to use QCombobox as one of the columns in model derived from QAbstractItemModel

  1. #1
    Join Date
    Dec 2012
    Posts
    1
    Qt products
    Qt4 Qt5

    Default How to use QCombobox as one of the columns in model derived from QAbstractItemModel

    I have created the model QAbstractItemModel. I have set it to treeview and other columns to other UI components from editor (see image).
    I want to use combobox as one of the UI components in editor. I have implemented it by referring to how I did it for QlineEdit. But, its not working. Definitely, I am missing out something. Any inputs in this regard or code sample will help.

    Thanks,
    Indrajitcombo1.png

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

    Default Re: How to use QCombobox as one of the columns in model derived from QAbstractItemMod

    How does your code look like?

    Do you use a QDataWidgetMapper or are you manually filling the widgets from model data?

    Cheers,
    _

Similar Threads

  1. Filter columns in QAbstractItemModel
    By Djab in forum Qt Programming
    Replies: 3
    Last Post: 3rd August 2012, 17:32
  2. setData in a model derived from QAbstractTableModel
    By enno in forum Qt Programming
    Replies: 2
    Last Post: 1st November 2010, 15:11
  3. Replies: 2
    Last Post: 12th May 2010, 14:32
  4. QBstractTableMode derived model, not showing in QTableView
    By high_flyer in forum Qt Programming
    Replies: 4
    Last Post: 24th March 2010, 16:04
  5. QAbstractItemModel: size of columns
    By kima in forum Qt Programming
    Replies: 0
    Last Post: 24th October 2008, 10:16

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.