Results 1 to 2 of 2

Thread: QListView drawing text including smileys

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default QListView drawing text including smileys

    Hi all,

    I have a chat program and I don't know how to display strings like "Hello :-)". You see I want to display it like "Hello ". To do so, I need do sort of smilify the text content. I've found and used the following but couldn't make it work.

    Qt Code:
    1. doc->setHtml(textMessage);
    2. doc->drawContents(painter, messageRect);
    To copy to clipboard, switch view to plain text mode 

    I've attached my delegate class for you to analyze if you want.

    Regards.
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: QListView drawing text including smileys

    Correction: it displays the smilified string but in different place. I guess I'm messing with rect that I'm drawing it.

Similar Threads

  1. custom curves including text
    By cradle in forum Qwt
    Replies: 2
    Last Post: 29th November 2011, 08:45
  2. Replies: 2
    Last Post: 28th October 2011, 07:46
  3. Replies: 2
    Last Post: 16th May 2011, 01:15
  4. How to read text file including all empty spaces..
    By umulingu in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2009, 08:33
  5. Drawing Text
    By QbelcorT in forum Qt Programming
    Replies: 7
    Last Post: 8th March 2009, 18:33

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.