Results 1 to 3 of 3

Thread: Clear background color a tabwidget

  1. #1
    Join Date
    Mar 2013
    Posts
    45
    Thanks
    23
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Clear background color a tabwidget

    hi

    How do I clear the background color tabwidget?

    Capture.JPG

    I want to clear white color background.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Clear background color a tabwidget

    You are (I guess) applying an image background to the top-level window without considering how that background cascades down to child widgets. Target your top-level background by (a unique) object name and it will not cascade to child widgets (which in this case will get a default, usually white, background).

    See Style Sheet Usage, Customizing the Foreground and Background Colors

  3. #3
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Clear background color a tabwidget

    By applying the following snippet to your widget's style;

    Qt Code:
    1. QWidget#your_widget{background-image:"your-image.png"}
    To copy to clipboard, switch view to plain text mode 

    This makes the background image applied for solely the regarding widget - not the widget and it's children.
    Last edited by zgulser; 9th July 2013 at 23:17.

Similar Threads

  1. Background color
    By FelixB in forum Qwt
    Replies: 4
    Last Post: 24th June 2013, 07:03
  2. Setting Background Color
    By SixDegrees in forum Qt Programming
    Replies: 5
    Last Post: 16th February 2011, 18:33
  3. QGLWidget won't display anything except the clear color
    By alexbcd in forum Qt Programming
    Replies: 1
    Last Post: 6th October 2010, 06:01
  4. QTextTable background color?
    By anupamgee in forum Qt Programming
    Replies: 0
    Last Post: 26th June 2009, 10:40
  5. QLabel background color
    By munna in forum Newbie
    Replies: 3
    Last Post: 1st May 2006, 15:36

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.