Results 1 to 2 of 2

Thread: Rich Text Inside QListWidgetItem?

  1. #1
    Join Date
    Feb 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Question Rich Text Inside QListWidgetItem?

    I want to put some rich text in a QListWidgetItem inside a QListWidget I have in my app. I've been searching all over but haven't been able to find anything that makes sense to me. I've read about setItemWidget but everything I've read seems to indicate that that is not the best approach. I've also read about delegates but all the examples I could find were far too overcomplicated for my use. I simply want to display some rich text inside a QListWidgetItem with some, like, bold text and links and such. Nothing too exotic. I need the links to be clickable though.

    If someone could provide an example with just the bare minimum to achieve what I want I would greatly appreciate it.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Rich Text Inside QListWidgetItem?

    See in the middle of post http://www.qtcentre.org/threads/2777...getItem-how-to There you find a small code. Do the richt text painting in the paint method.

Similar Threads

  1. How find QPoint from a QListWidgetItem inside viewport?
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th April 2008, 13:28
  2. Rich text with QPainter?
    By sarefo in forum Qt Programming
    Replies: 3
    Last Post: 7th April 2008, 15:40
  3. QTextEdit + paste rich text as plain text only
    By Yong in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2008, 17:45
  4. Rich Text Format
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 4th October 2006, 11:53
  5. Painting Rich Text
    By xanthine in forum Qt Programming
    Replies: 7
    Last Post: 16th April 2006, 00:35

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.