Results 1 to 8 of 8

Thread: QRubberBand widget background transparent

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Question QRubberBand widget background transparent

    Hello,

    I am trying to get rid of the half-transparent fill of the QRubberBand widget. I just want it transparent.
    What I already tried:

    Qt Code:
    1. QPalette p = _rubberBand->palette();
    2. p.setColor(QPalette::Background, Qt::transparent);
    3. _rubberBand->setPalette(p);
    To copy to clipboard, switch view to plain text mode 
    and
    Qt Code:
    1. _rubberBand->setStyleSheet("background-color: rgba(0,0,0,0)");
    To copy to clipboard, switch view to plain text mode 
    and
    Qt Code:
    1. _rubberBand->setPalette(Qt::transparent);
    2. _rubberBand->setAttribute(Qt::WA_NoSystemBackground);
    3. _rubberBand->setAttribute(Qt::WA_TranslucentBackground);
    4. _rubberBand->setAttribute(Qt::WA_TransparentForMouseEvents);
    To copy to clipboard, switch view to plain text mode 

    but there is no effect at all. The rectangle is always rendered the same way (see attachment)...

    How can I fix this?

    Thank you in advance.
    Attached Images Attached Images

Similar Threads

  1. Replies: 2
    Last Post: 6th October 2010, 14:25
  2. Custom QRubberBand with transparent background
    By mdomke in forum Qt Programming
    Replies: 1
    Last Post: 11th June 2010, 10:34
  3. Draw transparent SVG in Background of Widget
    By soul_rebel in forum Qt Programming
    Replies: 0
    Last Post: 28th October 2008, 20:44
  4. Semi-Transparent Background on Widget?
    By JimDaniel in forum Qt Programming
    Replies: 3
    Last Post: 16th January 2008, 18:19
  5. transparent background of the main widget
    By nagpalma in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2007, 17:52

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.