Results 1 to 4 of 4

Thread: using QComboBox as an ItemView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: using QComboBox as an ItemView

    For an icon, make QBrushModel::data() return a pixmap for Qt::DecorationRole. QComboBox can only represent the contents of a single column, so you need to return both decoration and display roles for the same column.
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    EricTheFruitbat (24th January 2007)

  3. #2
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: using QComboBox as an ItemView

    Qt::DecorationRole was exactly what was called for.

    Thank you.

Similar Threads

  1. QDataWidgetMapper <=> QComboBox best practice
    By saknopper in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2007, 10:50
  2. segmentation fault insert QString in QCombobox
    By regix in forum Qt Programming
    Replies: 16
    Last Post: 8th August 2006, 08:46
  3. Automatically add items to a QComboBox (Qt4)
    By darkadept in forum Qt Programming
    Replies: 2
    Last Post: 19th May 2006, 15:32
  4. QcomboBox items
    By therealjag in forum Newbie
    Replies: 5
    Last Post: 27th March 2006, 08:21
  5. QComboBox +SUSE10.0 +qt4.1 strange behavior
    By antonio.r.tome in forum Qt Programming
    Replies: 6
    Last Post: 20th March 2006, 17:49

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.