Results 1 to 1 of 1

Thread: Gradient fill problem

  1. #1
    Join Date
    Sep 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Gradient fill problem

    Hi all.

    I am trying to fill an area with a gradient around a rect. I only need one color and a transparent gradient. In the attached picture you can see that there is a black rect on the left figure. What I would like to do is to paint a gradient like it is shown inside the red outlined area all around the black rect within the given boundarys. In Opengl it is easy to achieve this by splitting the outer area into triangles and assigning the color values to each vertex (right figure of the attached picture). I could not find anything like this in QT. Are there any other ways to achieve this? With a linear gradient brush I could paint the borders around the rect on the top,bottom,left and rigth, but what about the remaining triangles in the corners?

    Any help is appreciated

    Regards

    Andreas
    Attached Images Attached Images

Similar Threads

  1. Gradient in histogram
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 1st August 2009, 11:48
  2. Problem with fill style
    By hasmik in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2009, 16:07
  3. QPainter Gradient
    By ^NyAw^ in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2008, 12:53
  4. QSvgRenderer fill rule always evenOdd with gradient
    By mr.costa in forum Qt Programming
    Replies: 0
    Last Post: 24th April 2007, 17:04
  5. QStackedWidget fill Postscript image And scroll problem
    By patrik08 in forum Qt Programming
    Replies: 11
    Last Post: 22nd April 2007, 09:30

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.