Results 1 to 2 of 2

Thread: fading effect when text is too long

  1. #1
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Question fading effect when text is too long

    Hello;

    I have a long text in a rectangle. I want to fade out the last visible characters of the text.

    Any hints

    Thanks in advance for your help.

    Thanks

    Mut.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: fading effect when text is too long

    One way of doing that would be to have another rectangle on top, with a horizontal gradient that uses the same color as the background rect but where the alpha channel goes from fully transparent to fully opaque.

    Cheers,
    _

Similar Threads

  1. Replies: 1
    Last Post: 11th March 2014, 11:20
  2. Check box text too long
    By flogh in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 22nd November 2010, 09:56
  3. QListWidgetItem text too long
    By jcr in forum Qt Programming
    Replies: 3
    Last Post: 20th October 2010, 00:19
  4. buton text long ?
    By electronicboy in forum General Programming
    Replies: 3
    Last Post: 2nd November 2009, 10:21
  5. Fading effect on QPainter fillrect()
    By smarinr in forum Qt Programming
    Replies: 7
    Last Post: 29th April 2008, 21:57

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.