Results 1 to 2 of 2

Thread: Color some of the characters in a QStandardItem cell

  1. #1
    Join Date
    Feb 2018

    Default Color some of the characters in a QStandardItem cell

    I want to know how to color some characters in a cell in an array, I use QTableView with cells that contain QStandardItem.
    Thank you!

  2. #2
    Join Date
    Jan 2006
    Warsaw, Poland
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits

    Default Re: Color some of the characters in a QStandardItem cell

    You need a custom item delegate that will either do the drawing by itself that does what you want or will use QTextDocument API to render rich text.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.

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

    Sabri (29th May 2018)

Similar Threads

  1. Get checkbox of QStandardItem
    By Neptilo in forum Qt Programming
    Replies: 8
    Last Post: 7th December 2014, 04:52
  2. Reimplemented QStandardItem
    By Miga in forum Qt Programming
    Replies: 6
    Last Post: 3rd April 2012, 14:48
  3. Tree without using of QStandardItem
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2010, 12:23
  4. HTML and QStandardItem ?
    By alexandernst in forum Newbie
    Replies: 18
    Last Post: 4th August 2009, 12:07

Tags for this Thread


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.