Results 1 to 2 of 2

Thread: Combine custom delegate and model data() roles

  1. #1
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Combine custom delegate and model data() roles

    Hi,

    I have a custom model that colorizes each item based on a criteria using data() and its roles. This works correctly however if I use a custom delegate for some of the items the delegate draw() takes precedence over the model data() function. How can I combine them? Meaning, assign some draw aspects to data() like the background color, font type, etc, but delegate just the drawing of the item's data to the custom delegate?

    Thanks,
    Carlos.

  2. #2
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Combine custom delegate and model data() roles... Any advice?

    Hi,

    Can anyone give me some advice on this topic?

    Many thanks in advance,
    Carlos.

Similar Threads

  1. Replies: 9
    Last Post: 14th February 2013, 19:39
  2. Qt delegate model data and view
    By giusepped in forum Qt Programming
    Replies: 0
    Last Post: 27th July 2011, 11:30
  3. Custom Model? Custom View? Custom Delegate?
    By Doug Broadwell in forum Newbie
    Replies: 4
    Last Post: 11th February 2010, 20:23
  4. Replies: 0
    Last Post: 1st February 2010, 11:00
  5. How to populate delegate with model data.
    By kaushal_gaurav in forum Qt Programming
    Replies: 2
    Last Post: 4th August 2008, 09:31

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.