Results 1 to 2 of 2

Thread: draw long text in rect

  1. #1
    Join Date
    Dec 2009
    Location
    Shenzhen,China
    Posts
    21
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question draw long text in rect

    I want to display a string in a rect, implement it with drawText of QPainter. A problem just bring out when the string is too length that the rect can't contains it.

    The default is to clip the string and display in the rect, and i feel disppointed with this, what i want is clips some part of the string and diaplay like "abcd...", and fill the rect, i want to display something to hit that the rect is too small to contains it.

    I have try with some flags with Qt, but still can't sovle it.

    Thanks in advance for any point.

  2. #2
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

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

    yxtx1984 (21st January 2010)

Similar Threads

  1. How to draw the below round rect?
    By tszzp in forum Qt Programming
    Replies: 1
    Last Post: 7th January 2010, 09:58
  2. buton text long ?
    By electronicboy in forum General Programming
    Replies: 3
    Last Post: 2nd November 2009, 11:21
  3. Draw rect when mouse is pressed
    By crocpulsar in forum Qt Programming
    Replies: 0
    Last Post: 19th March 2009, 05:51
  4. Layout long text in QTableWidget
    By Tamtam in forum Newbie
    Replies: 0
    Last Post: 13th February 2009, 16:09
  5. How to draw a filled round rect?
    By high_flyer in forum Qt Programming
    Replies: 8
    Last Post: 11th May 2006, 11:26

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.