Results 1 to 5 of 5

Thread: Adding shadow effects to QPainter, QLabels and QPushButtons

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    28
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Adding shadow effects to QPainter, QLabels and QPushButtons

    I've created my first GUI, mostly using QPainter, QLabels and QPushButtons. I've done a lot of white, but since the background sometimes will change to black, I need to add some sort of shadow / glow effect around my elements.

    QPainter: The only clue I've found here is using a gradient brush as my pen. The problem is that the gradient is specified from an absolute coordinate, but I would like the centre of the gradient to always be at my pen-tip.

    QPushButtons: Using stylesheets I've created colored buttons with white borders, but have no idea how to add shadows on the outside of the borders.

    QLabels: Not a clue, but maybe I can use drawText instead, if I get my painter working?
    Last edited by anr78; 3rd September 2010 at 10:23. Reason: Typo.

Similar Threads

  1. Replies: 8
    Last Post: 8th May 2009, 09:14
  2. Where is my QPushButtons
    By HelloDan in forum Qt Programming
    Replies: 4
    Last Post: 30th March 2009, 07:15
  3. How to draw soft shadow with QPainter?
    By troorl_ua in forum Qt Programming
    Replies: 9
    Last Post: 13th October 2008, 13:01
  4. Replies: 1
    Last Post: 1st November 2007, 07:25
  5. Mouse Over Event on QPushButtons
    By merry in forum Qt Programming
    Replies: 2
    Last Post: 6th August 2007, 13:23

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
  •  
Qt is a trademark of The Qt Company.